Need help. [Giving Rep]
#3

Like This?

Код:
CMD:aduty(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 1)
	{
	    foreach(Player, i)
		{
		    new Float:health, Float:armour;
			new string[128];
        	if(GetPVarInt(playerid, "AdminDuty") == 0)
			{
				format( string, sizeof( string ), "{AA3333}[Notice]{FFFF00}: %s (ID: %d) is now on Admin duty.", GetPlayerNameEx(i), i);
				BroadCast( COLOR_YELLOW, string);
				GetPlayerHealth(playerid, health);
				GetPlayerArmour(playerid, armour);
				SetPlayerHealth(playerid, health + 100000);
				SetPlayerArmour(playerid, armour + 100000);
	            SetPVarInt(playerid, "AdminDuty", 1);
	            Admins += 1;
	        }
	        else
			{
	            format( string, sizeof( string ), "{AA3333}{Notice]{FFFF00}: %s (ID: %d) is now off Admin duty.", GetPlayerNameEx(i), i);
				BroadCast( COLOR_YELLOW, string);
				SetPlayerHealth(playerid, health);
				SetPlayerArmour(playerid, armour);
	            DeletePVar(playerid, "AdminDuty");
	            Admins -= 1;
	        }
		}
    }
    else
	{
        SendClientMessageEx(playerid, COLOR_GRAD1, "   You are not an Administrator.");
    }
    return 1;
}
Reply


Messages In This Thread
Need help. [Giving Rep] - by John_Johnson - 11.01.2012, 07:57
Re: Need help. [Giving Rep] - by ScriptJorkis - 11.01.2012, 07:59
Re: Need help. [Giving Rep] - by John_Johnson - 11.01.2012, 08:06
Re: Need help. [Giving Rep] - by ScriptJorkis - 11.01.2012, 08:12
Re: Need help. [Giving Rep] - by sGarfield - 11.01.2012, 08:23
Re: Need help. [Giving Rep] - by John_Johnson - 11.01.2012, 08:52
Re: Need help. [Giving Rep] - by John_Johnson - 11.01.2012, 08:56
Re: Need help. [Giving Rep] - by ScriptJorkis - 11.01.2012, 09:02
Re: Need help. [Giving Rep] - by John_Johnson - 11.01.2012, 09:30

Forum Jump:


Users browsing this thread: 1 Guest(s)