02.06.2014, 00:37
i need to move this again to dialog instead of sendclientmessage
Код:
CMD:admins(playerid, params[]) { new online, string[128], file[32]; if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command."); if(PlayerInfo[playerid][pAdmin] < 1) { foreach(Player, i) { if(PlayerInfo[i][pAdmin] && aDuty[i]) { online ++; } } format(string, sizeof(string), "On-Duty Admins: %d", online); SendClientMessage(playerid, COLOR_ORANGE, string); foreach(Player, i) { if(PlayerInfo[i][pAdmin] && aDuty[i]) { format(string, sizeof(string), "- [Level: %d] %s", PlayerInfo[i][pAdmin], NORPN(i)); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); } } } else { foreach(Player, i) { if(PlayerInfo[i][pAdmin]) { online ++; } } format(string, sizeof(string), "Online Admins: %d", online); SendClientMessage(playerid, COLOR_ORANGE, string); foreach(Player, i) { if(PlayerInfo[i][pAdmin]) { if(!aDuty[i]) { format(file, sizeof(file), "users/%s.ini",RPNU(i)); format(string, sizeof(string), "- [Level: %d] %s [Admin Name: %s]", PlayerInfo[i][pAdmin], NORPN(i), dini_Get(file, "AdminName")); } else { format(file, sizeof(file), "users/%s.ini",RPNU(i)); format(string, sizeof(string), "- [Level: %d] %s [RP Name: %s]", PlayerInfo[i][pAdmin], NORPN(i), dini_Get(file, "OldName")); } if(PlayerInfo[i][pGangMod]) strcat(string, " [Gang Mod]"); if(PlayerInfo[i][pFacMod]) strcat(string, " [Fac Mod]"); if(PlayerInfo[i][pDoorMod]) strcat(string, " [Door Mod]"); if(PlayerInfo[i][pBizMod]) strcat(string, " [Biz Mod]"); if(PlayerInfo[i][pHouseMod]) strcat(string, " [House Mod]"); if(PlayerInfo[i][pGameAffairs]) strcat(string, " [Game Affairs]"); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); } } } return 1; }