Help with restricted Class
#9

pawn Code:
new AllowedToSpawn[MAX_PLAYERS];

public OnPlayerRequestClass(playerid, classid)
{
    AllowedToSpawn[playerid] = 0;
    if(classid == 4 && PlayerInfo[playerid][pAdmin] < 1)
    {
        AllowedToSpawn[playerid] = 0;
        return 0;
    }
    return 1;
}

public OnPlayerRequestSpawn(playerid)
{
    if(AllowedToSpawn[playerid] == 0)
    {
        SendClientMessage(playerid,COLOR_GREEN,"You may not spawn.");
        return 0;
    }
    return 1;
}
OnPlayerConnect and disconnect add AllowedToSpawn[playerid] = 1;
Reply


Messages In This Thread
Help with restricted Class - by Azzeto - 30.09.2011, 14:52
Re: Help with restricted Class - by Jafet_Macario - 30.09.2011, 15:02
Re: Help with restricted Class - by Azzeto - 30.09.2011, 15:04
Re: Help with restricted Class - by Jafet_Macario - 30.09.2011, 15:06
Re: Help with restricted Class - by Azzeto - 30.09.2011, 15:13
Re: Help with restricted Class - by Jafet_Macario - 30.09.2011, 15:17
Re: Help with restricted Class - by Azzeto - 30.09.2011, 15:17
Re: Help with restricted Class - by Jafet_Macario - 30.09.2011, 15:19
Re: Help with restricted Class - by DRIFT_HUNTER - 30.09.2011, 16:43

Forum Jump:


Users browsing this thread: 1 Guest(s)