At the moment, this method expects a raw value the game uses to specify health. Maximum health is based off of the mission data, so some maps use value 200, while others can be over 600.
We will make sure health is uniform on the server-side, but right now, you need to set health to 200 if you want full health on freeride map.
Arguments
Type
Description
player
Player ID
float
Health value
Returns
0 if successful, -1 if failed
Set position
playerPositionSet(player, vec3)
Sets the player position.
Remarks
None.
Arguments
Type
Description
player
Player ID
vec3
Array of 3 float values
Returns
0 if successful, -1 if failed
Set direction
playerDirectionSet(player, vec3)
Sets the player's forward direction vector.
Remarks
None.
Arguments
Type
Description
player
Player ID
vec3
Array of 3 float values
Returns
0 if successful, -1 if failed
Set heading
playerHeadingSet(player, float)
Sets the player heading angle.
Remarks
Uses a ±180 degree format.
Arguments
Type
Description
player
Player ID
float
±180 degree angle
Returns
0 if successful, -1 if failed
Get name
playerNameGet(player)
Retrieves the player name.
Remarks
None.
Arguments
Type
Description
player
Player ID
Returns
string player name
Get model
playerModelGet(player)
Retrieves the player's model.
Remarks
None.
Arguments
Type
Description
player
Player ID
Returns
string player model name
Get health
playerHealthGet(player)
Retrieves the current player's health.
Remarks
At the moment, this method returns a raw value the game uses to specify health. Maximum health is based off of the mission data, so some maps use value 200, while others can be over 600.
We will make sure health is uniform on the server-side, but right now, you need to be aware that full health differs per mission and freeride uses value of 200.
Arguments
Type
Description
player
Player ID
Returns
float player health
Get heading
playerHeadingGet(player)
Retrieves the player's heading angle.
Remarks
Uses a ±180 degree format.
Arguments
Type
Description
player
Player ID
Returns
float heading angle
Get position
playerPositionGet(player)
Retrieves the player position.
Remarks
None.
Arguments
Type
Description
player
Player ID
Returns
vec3 array of 3 float values
Get direction
playerDirectionGet(player)
Retrieves the player direction.
Remarks
Retrieves the player's forward vector direction.
Arguments
Type
Description
player
Player ID
Returns
vec3 array of 3 float values
Visibility
There are several visibility options you can set for the player: