/aduty ZCMD
#6

Quote:
Originally Posted by TFreemen
View Post
Code:
enum pInfo
{       
     pAdmin,
     pAdminDuty,
};

CMD:aduty(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, -1, "This is an admin only command!");
	if(PlayerInfo[playerid][pAdminDuty] == 0)
	{

		SendClientMessage(playerid, COLOR_YELLOW, "You are now on administrative duty! Remember to check /reports!");
		PlayerInfo[playerid][pAdminDuty] = 1;
		SetPlayerHealth(playerid, 100000);
		SetPlayerArmour(playerid, 100000);
		new string[128];
		format(string, sizeof(string), "Administrator %s is now on Admin Duty! (/report for assistance)", GetPlayerNameEx(playerid));
		SendClientMessageToAllEx(COLOR_YELLOW, string);
	}
	else
	{
			SendClientMessageEx(playerid, COLOR_RED, "You are now off admin duty!");
			SetPlayerHealth(playerid, 100);
			SetPlayerArmour(playerid, 0);
			PlayerInfo[playerid][pAdminDuty] = 0;
	}
    return 1;
}
Since you just made the whole thing, you forgot to add the variable of PlayerInfo.
Reply


Messages In This Thread
/aduty ZCMD - by Blackazur - 25.12.2012, 18:31
Re: /aduty ZCMD - by `Lᴇᴏɴ - 25.12.2012, 18:33
Re: /aduty ZCMD - by jNkk - 25.12.2012, 18:34
Respuesta: /aduty ZCMD - by Strier - 25.12.2012, 18:34
Re: /aduty ZCMD - by TFreemen - 25.12.2012, 18:52
Re: /aduty ZCMD - by Randy More - 25.12.2012, 18:56
Re: /aduty ZCMD - by Konstantinos - 25.12.2012, 18:58
Re: /aduty ZCMD - by TFreemen - 25.12.2012, 19:00
Re: /aduty ZCMD - by Infinity90 - 25.12.2012, 19:01
Respuesta: /aduty ZCMD - by Strier - 25.12.2012, 19:51

Forum Jump:


Users browsing this thread: 1 Guest(s)