Help with easy command
#3

try this
Код:
CMD:aduty(playerid,params[])
{
   if(PlayerInfo[playerid][Level] >= 1)
   {
         if(PlayerInfo[playerid][OnDuty] == 0) {
         PlayerInfo[playerid][OnDuty] = 1;
	     new str[128], AdminName[28];
         GetPlayerName(playerid, AdminName, sizeof(AdminName));
         format(str, sizeof(str), "%s is now on Admin duty!", AdminName);
         SendClientMessageToAll(red, str);
         SetPlayerSkin(playerid,217);
         SetPlayerTeam(playerid, 6);
   	     SetPlayerColor(playerid, 0xF600F6FF);
         SetPlayerHealth(playerid, 100000000000);
         SetPlayerArmour(playerid, 100000000000);
		 ResetPlayerWeapons(playerid);
         GivePlayerWeapon(playerid, 38,999999999);
         Update3DTextLabelText(RankLabel[playerid], 0xFFFFFFFF, " ");
         gTeam[playerid] = TEAM_NONE;
         }
         else if(PlayerInfo[playerid][OnDuty] == 1) {
         PlayerInfo[playerid][OnDuty] = 0;
         new str[128], AdminName[28];
         GetPlayerName(playerid, AdminName, sizeof(AdminName));
         format(str, sizeof(str), "%s is now off Admin duty", AdminName);
         SendClientMessageToAll(red, str);
         SetPlayerHealth(playerid, 0);
		 ForceClassSelection(playerid);
	     SetPlayerHealth(playerid, 0);
	     SetPlayerArmour(playerid, 0);
         new rand = random(sizeof(PlayerColors));
         SetPlayerColor(playerid, PlayerColors[rand]);
         FirstSpawn[playerid] = 1;
         }
   } else return 0;
   return 1;
}
Reply


Messages In This Thread
Help with easy command - by Chrillzen - 15.10.2013, 19:39
Re: Help with easy command - by David (Sabljak) - 15.10.2013, 19:43
Re: Help with easy command - by Tomix - 15.10.2013, 19:45
Re: Help with easy command - by DanishHaq - 15.10.2013, 19:51
Re: Help with easy command - by Chrillzen - 15.10.2013, 19:52

Forum Jump:


Users browsing this thread: 2 Guest(s)