GetPVarsUpperIndex
From SA-MP Wiki
(Difference between revisions)
| Revision as of 07:57, 22 May 2012 Smithy (Talk | contribs) ← Previous diff |
Current revision LaZ (Talk | contribs) (noticed the pages can be edited. yay) |
||
| Line 2: | Line 2: | ||
| {{Title}} | {{Title}} | ||
| - | {{Description|Returns the highest pVar ID.<br/>Each pVar has it's own unique identification number for lookup, this function returns the highest ID set for a player.}} | + | {{Description|<br/>Each PVar has its own unique identification number for lookup, this function returns the highest ID set for a player.}} |
| {{Parameters|playerid}} | {{Parameters|playerid}} | ||
| - | {{Param|playerid|The ID of the player to get the upper pvar index of}} | + | {{Param|playerid|The ID of the player to get the upper PVar index of}} |
| - | {{NoReturn}} | + | {{Returns|The highest PVar ID.}} |
| <pawn> | <pawn> | ||
| new szString[32]; | new szString[32]; | ||
| - | format(szString, sizeof(szString), "You have %i pVars stored.", GetPVarsUpperIndex(playerid)); | + | format(szString, sizeof(szString), "You have %i PVars stored.", GetPVarsUpperIndex(playerid)); |
| SendClientMessage(playerid, -1, szString); | SendClientMessage(playerid, -1, szString); | ||
| </pawn> | </pawn> | ||
Current revision
Each PVar has its own unique identification number for lookup, this function returns the highest ID set for a player.
(playerid)
| playerid | The ID of the player to get the upper PVar index of |
| Returns | The highest PVar ID. |
new szString[32]; format(szString, sizeof(szString), "You have %i PVars stored.", GetPVarsUpperIndex(playerid)); SendClientMessage(playerid, -1, szString);
Related Functions
The following functions may be useful, as they are related to this function in one way or another.
- GetPVarNameAtIndex: Get the player variable's name from its index.
- GetPVarType: Get the type of the player variable.
