23.09.2012, 06:36
new aDuty[MAX_PLAYERS]
new aHelper[MAX_PLAYERS]
rpn just get playername
REP ++ hope i helped u u can copy and paste the same thing twice switch aduty with aHelper the second time thats all
PEACEMAN
new aHelper[MAX_PLAYERS]
rpn just get playername
Код:
CMD:admins(playerid, params[]) { new string[128]; new count = 0; SendClientMessage(playerid, COLOR_PURPLE, "|____________________Admins Online____________________|"); { if(aDuty[playerid] == 1) { if(PlayerInfo[playerid][pAdmin] >= 1) { format(string, 256, "Administrator: - [Administrator: %s]",, RPN(playerid)); SendClientMessage(playerid, COLOR_WHITE, string); count++; } } } if(count == 0) { SendClientMessage(playerid, COLOR_WHITE, "[Error:] Currently no administrators"); } SendClientMessage(playerid, COLOR_PURPLE, "______________________________________________________________________________________"); return 1; }
Код:
CMD:aduty(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); if(!aDuty[playerid]) { aDuty[playerid] = 1; } else { aDuty[playerid] = 0; } return 1; }
