26.02.2013, 19:54
Alright, here's my version:
Edit it to your likings if you want health, make a setplayerhealth, if you want a color change it from TRANSPARENT to "color here"
Simple
Код:
command(aduty, playerid, params[]) { if(Player[playerid][AdminLevel] >= 1) { if(isnull(params)) return SendClientMessage(playerid, WHITE, "Server: /aduty [on/off]"); { new string[256]; if(strmatch("on", params)) { if(aDuty[playerid] == 0) { aDuty[playerid] = 1; format(string, sizeof(string), "AdmMsg: Admin %s is now on Admin Duty.", RemoveUnderScore(playerid)); SendToAdmins(RED, string, 1); SendToAdmins(RED, string, 0); SetPlayerColor(playerid, ADUTY); } else return SendClientMessage(playerid, WHITE, "You are already on Admin Duty."); } else if(strmatch("off", params)) { if(aDuty[playerid] == 1) { aDuty[playerid] = 0; format(string, sizeof(string), "AdmMsg: Admin %s in now off Admin Duty.", RemoveUnderScore(playerid)); SendToAdmins(RED, string, 1); SendToAdmins(RED, string, 0); SetPlayerColor(playerid, TRANSPARENT); } else return SendClientMessage(playerid, WHITE, "You are already off Admin Duty."); } } } else return SendClientMessage(playerid, GREY, AdminOnly); return 1; }
Simple