Shared
Teleport
Function to teleport the focused player only with given coords
function FPlayer:Teleport(coords: vector3)
Parameters description
coords
- the coordinates to use when teleporting the player
SpawnVehicle
Function to spawn a vehicle with specific vehicle model and the option to spawn the player inside the vehicle
function FPlayer:SpawnVehicle(
vehModel: string|integer,
spawnPlayerInside: boolean?,
saveVehicle: boolean?
): integer vehicle
Parameters description
vehModel
- the vehicle model in string or hash formatspawnPlayerInside
- sets whether or not spawn the player insaveVehicle
- sets whether or not save the vehicle, the player is currently in if it's in any vehicle
Return description
vehicle
- the entityId of the spawned vehicle
SetHealth
Function to set the health of the focused player
function FPlayer:SetHealth(health: number?)
Parameters description
health
- the health to set (if nil, it will heal the player with the maximum health for its ped)
SetInvincibility
Function to toggle focused player's invincibility
function FPlayer:SetInvincibility(toggle: boolean?)
Parameters description
toggle
- sets whether or not the player is invincible
Last updated