11.06.2014, 03:53
It's < 100, not 99.
Just a shortened and neater version:
EDIT: If this doesn't work, then gTeam[playerid] isn't TEAM_SWAT.
Just a shortened and neater version:
pawn Код:
public OnPlayerRequestSpawn(playerid)
{
if(gTeam[playerid] == Team_Cali)
{
if(strfind(name, "[Cali]", true) != 0) //This will only work if the player has [Cali] at the BEGINNING of their name.
{
GameTextForPlayer(playerid, "~r~You're not in (Cali)!", 3000, 5);
ForceClassSelection(playerid);
return 0;
}
}
else if(gTeam[playerid] == TEAM_SWAT)
{
if(GetPlayerScore(playerid) < 100)
{
GameTextForPlayer(playerid, "NEED 100 SCORE", 3000, 3);
SendClientMessage(playerid, -1, "You need atleast 100 score to play on this team.");
ForceClassSelection(playerid);
return 0;
}
}
return 1;
}