Skip to main content

GetPVarFloat

Description

Gets a player variable as a float.

NameDescription
playeridThe ID of the player whose player variable you want to get.
const pvar[]The name of the player variable.

Returns

The float from the specified player variable

Examples

LoadPlayerPos(playerid)
{
new Float:x, Float:y, Float:z;

x = GetPVarFloat(playerid, "Xpos");
y = GetPVarFloat(playerid, "Ypos");
z = GetPVarFloat(playerid, "Zpos");

SetPlayerPos(playerid, x, y, z);
return 1;
}

Notes

tip

Variables aren't reset until after OnPlayerDisconnect is called, so the values are still accessible in OnPlayerDisconnect.