SA-MP Forums Archive
How to make myself army? - 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: How to make myself army? (/showthread.php?tid=326518)



How to make myself army? - iCush - 17.03.2012

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



Re: How to make myself army? - Alternative112 - 17.03.2012

The actual command to change the skin, you mean?

Код:
SetPlayerSkin(playerid, 287);



Re: How to make myself army? - WardenCS - 17.03.2012

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



Re: How to make myself army? - GNGification - 17.03.2012

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;
}