GetPVarFloat

Description

Gets a player variable as a float.

NameDescription
playeridThe ID of the player whose player variable you want to get.
varnameThe name of the player variable.

Returns

The float from the specified player variable

Examples

forward LoadPos(playerid);
public LoadPos(playerid)
{
SetPlayerPos(playerid, GetPVarFloat(playerid,"xpos"), GetPVarFloat(playerid,"ypos"), GetPVarFloat(playerid,"zpos"));
return 1;
}

Notes

tip

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

Related Functions