SA-MP Forums Archive
GetPlayerVersion - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: GetPlayerVersion (/showthread.php?tid=518208)



GetPlayerVersion - TheSy - 08.06.2014

Good evening.

I want to know how to check if the player has the latest version of SAMP with GetPlayerVersion function.

I do not know how to find out if it has the 0.3z and if this is not the case of the kick.

Thx


Re: GetPlayerVersion - Konstantinos - 08.06.2014

pawn Код:
public OnPlayerConnect(playerid)
{
    if (!IsPlayerNPC(playerid))
    {
        new version[16];
        GetPlayerVersion(playerid, version, sizeof (version));
        if (strcmp(version, "0.3z")) return Kick(playerid);
    }
    // rest of code..
    return 1;
}



Re: GetPlayerVersion - TheSy - 08.06.2014

Ah thx !!