How to make myself army?
#1

Код:
	if(gTeam[playerid] == TEAM_ARMY && CanUseArmy[playerid] != 1337)
	{
	    SendClientMessage(playerid,COLOR_ERROR,"You do not have permission to use this class.");
		return 0;
	}
Reply
#2

The actual command to change the skin, you mean?

Код:
SetPlayerSkin(playerid, 287);
Reply
#3

Код:
if (strcmp("/setarmy", cmdtext, true) == 0)
{
CanUseArmy[playerid] = 1337;
gTeam[playerid] = TEAM_ARMY;
return 1;
}
Reply
#4

or maybe
pawn Код:
if (strcmp("/setarmy", cmdtext, true) == 0)
{
           if(IsPlayerAdmin(playerid)) CanUseArmy[playerid] = 1337;
           else SendClientMessage(playerid, 0xFFFFF, "You are not authorized to use this command!");
           return 1;
}
and when you're choosing the skin you can check if player CanUseArmy = 0 or 1337

and of course

pawn Код:
if (strcmp("/removearmy", cmdtext, true) == 0)
{
           if(IsPlayerAdmin(playerid)) CanUseArmy[playerid] = 0;
           else SendClientMessage(playerid, 0xFFFFF, "You are not authorized to use this command!");
           return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)