01.09.2014, 10:00
Hey guys. My problem is that commands /admins and /freezeall /unfreezeall don't work properly!
Command /admins works how it should do only when i am alone on server, when someone else join it shows that all players in server are highest levels, owner.. Here is the code:
Commands /freezeall and /unfreezeall problem is /freezeall freeze just player who used it and /unfreezeall don't work at all.. Here are the codes:
Command /admins works how it should do only when i am alone on server, when someone else join it shows that all players in server are highest levels, owner.. Here is the code:
Quote:
CMD:admins(playerid,params[]) { SendClientMessage(playerid, ORANGE, " "); SendClientMessage(playerid, ORANGE, "----' Online Admins '----"); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(PlayerInfo[playerid][Level] >= 1 || PlayerInfo[playerid][Level] <= 7) { new admtext[64], id[MAX_PLAYER_NAME], string[256]; if(PlayerInfo[playerid][Level] == 1) {admtext = "Level: 1 (Trial Administrator)";} else if(PlayerInfo[playerid][Level] == 2) {admtext = "Level: 2, (Administrator)";} else if(PlayerInfo[playerid][Level] == 3) {admtext = "Level: 3, (Master Administrator)";} else if(PlayerInfo[playerid][Level] == 4) {admtext = "Level: 4, (Moderator)";} else if(PlayerInfo[playerid][Level] == 5) {admtext = "Level: 5, (Master Moderator)";} else if(PlayerInfo[playerid][Level] == 6) {admtext = "Level: 6, (Lead Moderator)";} else if(PlayerInfo[playerid][Level] == 7) {admtext = "Level: 7, (Owner)";} else if(IsPlayerAdmin(i)) {admtext = "RCON Administrator";} else {admtext = "No admins online";} GetPlayerName(i, id, sizeof(id)); format(string, 256, "%s ( %s )", id, admtext); SendClientMessage(playerid, GREEN, string); } } } return 1; } |
Commands /freezeall and /unfreezeall problem is /freezeall freeze just player who used it and /unfreezeall don't work at all.. Here are the codes:
Quote:
CMD:freezeall(playerid,params[]) { #pragma unused params if(PlayerInfo[playerid][Level] >= 5) { CMDMessageToAdmins(playerid,"FREEZEALL"); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i) && (i != playerid) && i != ServerInfo[MaxAdminLevel]) { PlayerPlaySound(i,1057,0.0,0.0,0.0); TogglePlayerControllable(playerid,false); PlayerInfo[i][Frozen] = 1; } } new string[128]; format(string,sizeof(string),"Administrator \"%s\" has frozen all players", pName(playerid) ); return SendClientMessageToAll(blue, string); } else return SendClientMessage(playerid,red,"ERROR: You need to be level 5 to use this command"); } CMD:unfreezeall(playerid,params[]) { #pragma unused params if(PlayerInfo[playerid][Level] >= 5) { CMDMessageToAdmins(playerid,"UNFREEZEALL"); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i) && (i != playerid) && i != ServerInfo[MaxAdminLevel]) { PlayerPlaySound(i,1057,0.0,0.0,0.0); TogglePlayerControllable(playerid,true); PlayerInfo[i][Frozen] = 0; } } new string[128]; format(string,sizeof(string),"Administrator \"%s\" has unfrozen all players", pName(playerid) ); return SendClientMessageToAll(blue, string); } else return SendClientMessage(playerid,red,"ERROR: You need to be level 5 to use this command"); } |