GetPlayerVersion
From SA-MP Wiki
(Difference between revisions)
Revision as of 17:00, 16 January 2013 Drebin (Talk | contribs) (Grammar) ← Previous diff |
Revision as of 04:20, 5 February 2014 Connor Mead (Talk | contribs) Next diff → |
||
Line 1: | Line 1: | ||
{{Scripting}} | {{Scripting}} | ||
- | {{Title}} | ||
{{AddedIn0.3e|function}} | {{AddedIn0.3e|function}} | ||
Line 32: | Line 31: | ||
[[Category:Scripting Functions]] | [[Category:Scripting Functions]] | ||
+ | |||
+ | [[fr:GetPlayerVersion]] |
Revision as of 04:20, 5 February 2014
Description:
Returns the SA-MP client revision as reported by the player.
(playerid, version[], len)
playerid | The ID of the player to get the version of |
version[] | The string to store the player's version in, passed by reference |
len | The maximum size of the version. |
Return Values:
1 on success and 0 on failure.
public OnPlayerConnect(playerid) { new string[40]; GetPlayerVersion(playerid, string, sizeof(string)); format(string, sizeof(string), "Your version of SA-MP: %s", string); SendClientMessage(playerid, 0xFFFFFFFF, string); // possible text: "Your version of SA-MP: 0.3e-RC1" return 1; }
Related Functions
The following functions may be useful, as they are related to this function in one way or another.
- GetPlayerName: Get a player's name.
- GetPlayerPing: Get the ping of a player.
- GetPlayerIp: Get a player's IP.