FreezePlayer

From GT-MP
Jump to: navigation, search
FreezePlayer
Server-Side Function
Utilities-terminal.png Server-Side Csharp.png C#

Freezes or unfreezes a player into their current position. While frozen, they won't be able to move, but their walking and running animations will still play. The player will still be able to do other things, like shooting a weapon.


Syntax

API.freezePlayer(Client player, bool freeze);

Required Arguments

  • player: parameter input should be in Client type.
  • freeze: parameter input should be in bool type.

Usage example(s)

Example Description

[Command("freeze")]
public void FreezeCommand(Client sender, bool frozen)
{
  API.freezePlayer(sender, frozen);
}

References