18.01.2014, 22:18
The Problem is when i set my admin level in game and any other player register or login in he get same Adminlevel
WTF how to Fix it ? its cmd thanks for help !!
WTF how to Fix it ? its cmd thanks for help !!
Код:
CMD:setlevel(playerid,params[]) { new ID; new levels; new Nam[ MAX_PLAYER_NAME ]; new pname[ MAX_PLAYER_NAME ]; new str[128]; if(IsPlayerAdmin(playerid)|| Player[playerid][pAdmin] >= 5) { if(sscanf(params,"ui",ID,levels)) return SendClientMessage(playerid,0xFF9900AA, "USAGE: /setlevel [ID] [Level 1-10]"); if(levels > 10) return SendClientMessage(playerid,0xFF0000FF,"LEVELS AVAILABLE 1-10!"); if(!IsPlayerConnected(ID))return SendClientMessage(playerid,0xFF9900AA,"That user is not connected."); if(Player[ID][pAdmin] == levels) return SendClientMessage(playerid,0xFF0000FF, "ERROR: That person is already this admin level!"); GetPlayerName(playerid,Nam, MAX_PLAYER_NAME); GetPlayerName(ID,pname,MAX_PLAYER_NAME); if(levels == 0) { format(str, sizeof(str),"%s has set your Admin level to %d on the server. ",Nam,levels); SendClientMessage(ID,0xFF9900AA,str); format(str, sizeof(str),"You have set %s Admin level to %d!",pname,levels); SendClientMessage(playerid,0xFF9900AA,str); Player[ID][pAdmin] = levels; return 1; } format(str, sizeof(str),"%s has set your Admin level to %d on the server.",Nam,levels); SendClientMessage(ID,0xFF9900AA,str); format(str, sizeof(str),"You had set %s Admin level to %d!",pname,levels); SendClientMessage(playerid,0xFF9900AA,str); Player[ID][pAdmin] = levels; } else { SendClientMessage(playerid, COLOR_ORANGE, "You Need to Rcon admin Or Higher Admin to use this Cmd"); } return 1; }