Restricting a Class
#1

Hi, I'm trying to restrict a class so you can only use it if your admin level 100.

This is my code so far:

pawn Код:
else if(GetPlayerSkin(playerid) == 230)
    {
        if(PlayerInfo[playerid][pAdmin] < 100)
        {
            SendClientMessage(playerid, COLOR_GREY,"This is a restricted class!");
            return 1;
        }
        GameTextForPlayer(playerid, "~y~OG Gangsta's", 2000, 3);
        SetPlayerPos(playerid, 1129.0776, -1488.1957, 22.7690);
        SetPlayerFacingAngle(playerid, 0.7288);
        SetPlayerCameraPos(playerid, 1129.1257,-1476.7831,22.7690);
        SetPlayerCameraLookAt(playerid, 1129.0983, -1485.8500, 22.7690);
        SetPlayerVirtualWorld(playerid, 1);
    }
    return 1;
}
I want the player to be able to see the class but when the click 'Spawn' it will send the message.

I also need to do this relating to the FBI and Military w/ If(PlayerInfo[playerid][pKills] >= 200) for example.

Thanks.
Reply


Messages In This Thread
Restricting a Class - by Melon - 11.08.2012, 21:33
Re: Restricting a Class - by FalconX - 11.08.2012, 21:43
Re: Restricting a Class - by Melon - 11.08.2012, 21:46
Re: Restricting a Class - by FalconX - 11.08.2012, 22:06

Forum Jump:


Users browsing this thread: 2 Guest(s)