Class(score req)
#2

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
    new s = GetPlayerSkin(playerid);
    switch (s) {
        case 270,296,30,292, 181, 294: if(GetPlayerScore(playerid) < 200) return SendClientMessage(playerid, -1, "ERROR: You need 200 score!");
    }
    return 1;
}
Or, even better:
pawn Код:
new allowedSkinScores[6][2] = {
{270, 200},
{296, 200},
{30, 200},
{292, 200},
{181, 200},
{294, 200}};

public OnPlayerRequestSpawn(playerid)
{
    for(new i = 0; i < sizeof allowedSkinScores; i++) {
        if( (GetPlayerSkin(playerid) == allowedSkinScores[i][0]) && (GetPlayerScore(playerid) < allowedSkinScores[i][1])) return SendClientMessage(playerid, -1, "ERROR: You need 200 score!");
    }
    return 1;
}
Just add skin ID's to the array if you want more skins. And you can change 200 to any other score you want.
Reply


Messages In This Thread
Class(score req) - by SampzzonE - 07.08.2013, 20:00
Re: Class(score req) - by [XST]O_x - 07.08.2013, 20:27
Re: Class(score req) - by SampzzonE - 07.08.2013, 20:32

Forum Jump:


Users browsing this thread: 2 Guest(s)