class restriction
#5

Quote:
Originally Posted by Niko_boy
Посмотреть сообщение
you are close enough though.
Read this:
https://sampwiki.blast.hk/wiki/OnPlayerRequestClass


so here,

pawn Код:
if(classid == 2)
{
        GameTextForPlayer(playerid, "~r~ Fucker Team", 9999999, 6);
        if( PlayerInfo[playerid][pFaction] != ONE_REQUIRED_TO_BE_IN_THIS_TEAM )
        {
                  SendClientMessage(playerid, 0xFF0000FF, "Fuck you, you aren't registered on fucker team.");
                  return 0;
        }
}
PlayerInfo[playerid][pFaction] != ONE_REQUIRED_TO_BE_IN_THIS_TEAM
if the value of pFaction is not equal to that value required to be in this team deny the spawn. else go for it.
Nothing pops out when I put this

pawn Код:
if(classid == 2 && PlayerInfo[playerid][pFaction] == 1)
{
        GameTextForPlayer(playerid, "~r~ Fucker Team", 9999999, 6);
        // Your codes
} else SendClientMessage(playerid, 0xFF0000FF, "Fuck you, you aren't registered on fucker team.");
It shows the fuck you but I can spawn.
Reply


Messages In This Thread
class restriction - by Extraordinariness - 05.04.2014, 04:21
Re: class restriction - by Niko_boy - 05.04.2014, 04:44
Re: class restriction - by ChristianIvann09 - 05.04.2014, 04:44
Re: class restriction - by Niko_boy - 05.04.2014, 04:52
Re: class restriction - by Extraordinariness - 05.04.2014, 06:01
Re: class restriction - by SickAttack - 05.04.2014, 06:15

Forum Jump:


Users browsing this thread: 1 Guest(s)