SA-MP Forums Archive
Check Score For ClassSelection - 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: Check Score For ClassSelection (/showthread.php?tid=339607)



Check Score For ClassSelection - MichaelProPlayer - 04.05.2012

Script : If the player chooses Skin id = 0 and if he's score is less than 50 .. then he won't be able to choose that skin.

Can someone make an script for example plz Rep+1


Re: Check Score For ClassSelection - Pinguinn - 04.05.2012

pawn Код:
public OnPlayerRequestSpawn(playerid) {
    // Is he trying to spawn with skin id 0?
    if(GetPlayerSkin(playerid) == 0) {
        // Is his score less than 50?
        if(GetPlayerScore(playerid) < 50) {
            SendClientMessage(playerid, COLOR_WHITE, 'You need a higher score than 50 to spawn with this skin!');
            return 0;
        }
    }
}



Re: Check Score For ClassSelection - Accord - 04.05.2012

You have put it in the public "OnPlayerRequestClass":
Код:
if(GetPlayerScore(playerid) <= 50) return SendClientMessage(playerid, 0xff0000ff, "You don't have 50 points in your score);