14.08.2012, 17:03
Oigan el problema es el siguiente....
Quisiera que el cmd /settemplevel tenga un limite d level, osea kiero que de level hasta el 5.
El sistema que uso es el ladmin4v2 con 8 nivel admin editado x mi...
Aca el codigo y espero se ayudado por ustedes Saludos.!
Quisiera que el cmd /settemplevel tenga un limite d level, osea kiero que de level hasta el 5.
El sistema que uso es el ladmin4v2 con 8 nivel admin editado x mi...
Aca el codigo y espero se ayudado por ustedes Saludos.!
Код HTML:
dcmd_settemplevel(playerid,params[]) { if(PlayerInfo[playerid][LoggedIn] == 1) { if(PlayerInfo[playerid][Level] >= 7 || IsPlayerAdmin(playerid)) { new tmp[256], tmp2[256], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index); if(!strlen(tmp) || !strlen(tmp2)) return SendClientMessage(playerid, red, "USAGE: /settemplevel [playerid] [level]"); new player1, level, string[128]; player1 = strval(tmp); level = strval(tmp2); if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID) { if(PlayerInfo[player1][LoggedIn] == 1) { if(level > ServerInfo[MaxAdminLevel] ) return SendClientMessage(playerid,red,"ERROR: Incorrect Level"); if(level == PlayerInfo[player1][Level]) return SendClientMessage(playerid,red,"ERROR: Player is already this level"); CMDMessageToAdmins(playerid,"SETTEMPLEVEL"); new year,month,day; getdate(year, month, day); new hour,minute,second; gettime(hour,minute,second); if(level > 0) format(string,sizeof(string),"Administrator %s has temporarily set you to Administrator Status [level %d]", pName(playerid), level); else format(string,sizeof(string),"Administrator %s has temporarily set you to Player Status [level %d]", pName(playerid), level); SendClientMessage(player1,blue,string); if(level > PlayerInfo[player1][Level]) GameTextForPlayer(player1,"Promoted", 2000, 3); else GameTextForPlayer(player1,"Demoted", 2000, 3); format(string,sizeof(string),"You have made %s Level %d on %d/%d/%d at %d:%d:%d", pName(player1), level, day, month, year, hour, minute, second); SendClientMessage(playerid,blue,string); format(string,sizeof(string),"Administrator %s has made %s temp Level %d on %d/%d/%d at %d:%d:%d",pName(playerid), pName(player1), level, day, month, year, hour, minute, second); SaveToFile("TempAdminLog",string); PlayerInfo[player1][Level] = 4; return PlayerPlaySound(player1,1057,0.0,0.0,0.0); } else return SendClientMessage(playerid,red,"ERROR: Player must be registered and logged in to be admin"); } else return SendClientMessage(playerid, red, "Player is not connected"); } else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command"); } else return SendClientMessage(playerid,red,"ERROR: You must be logged in to use this commands"); } else return SendClientMessage(playerid,red,"Lo Sentimos Solo Autorizados Pueden Dar Cuenta VIP"); }