GetPlayerVersion
From SA-MP Wiki
Description:
Returns the SA-MP client version, as reported by the player.
(playerid, version[], len)
playerid | The ID of the player to get the client version of. |
version[] | The string to store the player's version in, passed by reference. |
len | The maximum length of the version. |
Return Values:
The length of the player's client version. 0 if player specified doesn't exist.
- The client version is stored in the specified array.
Example Usage:
public OnPlayerConnect(playerid) { new string[24]; 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.3.7" 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.