OnPlayerRequestSpawn
#1

The player needs 20 score to use this team... if the player dont have 20 score, it will not spawn

Is it like this?
pawn Код:
public OnPlayerRequestSpawn(playerid)
{
    if(gTeam[playerid] == SOLDIER)
    {
        if(GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid, SOLDIER_COLOR, "You are not a soldier. Apply in our forums to be a soldier.");
    }
    return 1;
}
Reply
#2

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
    if(gTeam[playerid] == SOLDIER)
    {
        if(GetPlayerScore(playerid) < 20) return SendClientMessage(playerid, SOLDIER_COLOR, "You are not a soldier. Apply in our forums to be a soldier.");
    }
    return 1;
}
Reply
#3

LOL, i still can spawn with score 0 ....
Reply
#4

Lol, sorry. I was in a hurry .....

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
    if(gTeam[playerid] == SOLDIER)
    {
        if(GetPlayerScore(playerid) < 20)
        {
            SendClientMessage(playerid, SOLDIER_COLOR, "You are not a soldier. Apply in our forums to be a soldier.");
            return 0; // prevents the player from spawning
        }
    }
    return 1;
}
Reply
#5

EDIT: The Code above will work fine.
Reply
#6

Thnx emmet. 1 rep for ya
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)