GetPVarFloat

From SA-MP Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 20:55, 13 April 2010
Ray187 (Talk | contribs)
(Removed "int_value" from "function parameters")
← Previous diff
Revision as of 04:39, 5 February 2014
Connor Mead (Talk | contribs)

Next diff →
Line 1: Line 1:
{{Scripting}} {{Scripting}}
-{{Title}} 
{{Description|Gets a player variable as a float.}} {{Description|Gets a player variable as a float.}}
Line 27: Line 26:
[[Category:Scripting Functions]] [[Category:Scripting Functions]]
 +
 +[[fr:GetPVarFloat]]

Revision as of 04:39, 5 February 2014



Description:

Gets a player variable as a float.


Parameters:
(playerid, varname[])
playeridThe ID of the player whose player variable you want to get.
varnameThe name of the player variable.

Return Values:

The float from the specified player variable


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

Related Functions

The following functions may be useful, as they are related to this function in one way or another.

  • SetPVarInt: Set an integer for a player variable.
  • GetPVarInt: Get the previously set integer from a player variable.
  • GetPVarString: Get the previously set string from a player variable.
In other languages