From GT-MP
Jump to: navigation, search
Shared Function
Utilities-terminal.png Server-Side System-users.png Client-Side
Csharp.png C# Javascript.png JavaScript

Freezes an entity's position.


API.setEntityPositionFrozen(NetHandle entity, bool frozen);
API.setEntityPositionFrozen(Client player, NetHandle entity, bool frozen); //overload

Required Arguments

  • entity: parameter input should be in NetHandle type.
  • frozen: parameter input should be in bool type.

Optional Arguments

  • player: parameter input should be in Client type.

NOTE: This function has 2 overloads!

  • 1st overload: Globally freezes an entity.
  • 2nd overload: Freezes an entity only for a selected player.

Usage examples

  • Globally freezes a vehicle's position:
   API.setEntityPositionFrozen(myVehicle, true);
  • Freezes a vehicle only for a player:
   API.setEntityPositionFrozen(player, myVehicle, true);