SA-MP Forums Archive
Locking some classes locks ALL classes - 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: Locking some classes locks ALL classes (/showthread.php?tid=368017)



Locking some classes locks ALL classes - thefatshizms - 11.08.2012

Hello i managed to lock classes but for some reason its locked all clases :O

pawn Code:
public OnPlayerRequestSpawn(playerid)
{
    if(gTeam[playerid] == ARMY || gTeam[playerid] == SWAT || gTeam[playerid] == STAT && PlayerInfo[playerid][Parmy] == 0 || PlayerInfo[playerid][Pswat] == 0 || PlayerInfo[playerid][Pstat] == 0)
    {
        SendClientMessage(playerid, COLOR_RED, "This class is only for people with rights. Visit sf-cnr.co.uk/forum to apply for this class");
        return 0;
    }
    return 1;
}