must have 300 score to spawn
#1

How can i make in homless team

You must have 300 Score To Choose this team.
Reply
#2

OnPlayerRequestClass:
pawn Код:
if(GetPlayerScore(playerid) < 300) return SendClientMessage(playerid,-1,"You must have 300 Score To Choose this team."), 0;
Reply
#3

anyone else?
Reply
#4

You should either set player's classid from OnPlayerRequestClass and then check if the classid of player is equal to your special class under OnPlayerRequestSpawn, to do the score checks. Or, use GetPlayerSkin. Here's an example:

pawn Код:
new
    p_ClassID[MAX_PLAYERS];
   
public OnPlayerRequestClass(playerid, classid)
{
    p_ClassID[playerid] = classid;
    return 1;
}

public OnPlayerRequestSpawn(playerid)
{
    if(p_ClassID[playerid] == 5) //Assuming that 5th class is so special
    {
        if(GetPlayerScore(playerid) < 300) return !SendClientMessage(playerid, 0xFF0000FF, "You must have at least 300 score to choose this class."); //! was used to return 0 after SCM function.
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)