Lo que pasa es que tengo rato ya que no me funsiona el comando /haceradmin :c me sale que no puedo usar el comando y pero ya soy level 10, tengo que quitando y dando admin fuera del juego (En la carpeta) y la verdad me canse de tener que reiniciar el SV solo para poner o quitar un admin.. Alguien porfavor ayudeme! porfavor :'c
![]() ![]() ESTA ES EL COMANDO QUE TENGO <zcmd> COMMAND:haceradmin(playerid, params[]) { new User, Level; if( Informacion[ playerid ] [ pAdmin ] >= 9 || IsPlayerAdmin(playerid)) { if(!strcmp(NombreScripter,Nombre(playerid))||!strc mp(NombreDueсo,Nombre(playerid))||!strcmp(NombreSe gundo,Nombre(playerid))||!strcmp(Encargado,Nombre( playerid))) { if( sscanf(params, "dd", User, Level)) return SendClientMessage(playerid, Error, "Error: utiliza /Haceradmin <Jugador> <Nivel>"); if( IsPlayerConnected( User ) ) { if( Level > 10 )return SendClientMessage(playerid, Error, "Error: Maximo Nivel 10"); Informacion[User][pAdmin] = Level; if(Informacion[User][pAdmin] != 0) Informacion[User][pAdmin] = 1; else Informacion[User][pAdmin] = 0; SendClientMessageEx( User, Blanco, "El administrador "Insertkaki"%s "Insertblanco"te otorgo Administracion nivel "Insertlima"%d!", Nombre(playerid), Level); SendClientMessageEx( playerid, Blanco, "Le Otorgastes nivel "Insertlima"%d "Insertadmin"de Administracion a "Insertkaki"%s!", Level, Nombre(User)); PlayerPlaySound(User,1056,0.0,0.0,0.0); GameTextForPlayer(User, "~G~~H~_Promovido", 5000, 6); }else return SendClientMessage(playerid, Error, "Error: El jugador no esta conectado!"); }else return SendClientMessage(playerid, COLOR_YELLOW, "[Seguridad]: Usted no puede usar este comando!"); }else return SendClientMessage(playerid, Error, "Error: Usted no es administrador o no tiene suficiente nivel!"); return 1; } |
if(!strcmp(NombreScripter,Nombre(playerid))||!strc mp(NombreDueсo,Nombre(playerid))||!strcmp(NombreSe gundo,Nombre(playerid))||!strcmp(Encargado,Nombre( playerid))) {
// Tendria que quedarte asi, copia esto y remplazalo si tienes errores vuelve.
COMMAND:haceradmin(playerid, params[]) {
new User, Level;
if( Informacion[ playerid ] [ pAdmin ] >= 0 || IsPlayerAdmin(playerid)) { //Esto hara que solo los que tenga nivel 0 daran admin, remplaza por 10 si quieres que nivel 10 lo de, depende de vos.
if( sscanf(params, "dd", User, Level)) return SendClientMessage(playerid, Error, "Error: utiliza /Haceradmin <Jugador> <Nivel>");
if( IsPlayerConnected( User ) ) {
if( Level > 10 )return SendClientMessage(playerid, Error, "Error: Maximo Nivel 10");
Informacion[User][pAdmin] = Level;
if(Informacion[User][pAdmin] != 0)
Informacion[User][pAdmin] = 1;
else
Informacion[User][pAdmin] = 0;
SendClientMessageEx( User, Blanco, "El administrador "Insertkaki"%s "Insertblanco"te otorgo Administracion nivel "Insertlima"%d!", Nombre(playerid), Level);
SendClientMessageEx( playerid, Blanco, "Le Otorgastes nivel "Insertlima"%d "Insertadmin"de Administracion a "Insertkaki"%s!", Level, Nombre(User));
PlayerPlaySound(User,1056,0.0,0.0,0.0);
GameTextForPlayer(User, "~G~~H~_Promovido", 5000, 6);
}else return SendClientMessage(playerid, Error, "Error: El jugador no esta conectado!");
}else return SendClientMessage(playerid, COLOR_YELLOW, "[Seguridad]: Usted no puede usar este comando!");
}else return SendClientMessage(playerid, Error, "Error: Usted no es administrador o no tiene suficiente nivel!");
return 1;
}
Rempla el que tienes..
Quitando la funcion de restricion. pawn Код:
|
COMMAND:haceradmin(playerid, params[])
{
new User, Level;
if(Informacion[playerid][pAdmin] >= 10 || IsPlayerAdmin(playerid))
{
if(sscanf(params, "dd", User, Level)) return SendClientMessage(playerid, Error, "Error: utiliza /Haceradmin <Jugador> <Nivel>");
if(IsPlayerConnected(User))
{
if(Level > 10 || Level < 0)return SendClientMessage(playerid, Error, "Error: Maximo Nivel 10 - Mнnimo nivel 10");
Informacion[User][pAdmin] = Level;
if(Informacion[User][pAdmin] != 0) Informacion[User][pAdmin] = 1;
else Informacion[User][pAdmin] = 0;
SendClientMessageEx(User, Blanco, "El administrador "Insertkaki"%s "Insertblanco"te otorgo Administracion nivel "Insertlima"%d!", Nombre(playerid), Level);
SendClientMessageEx(playerid, Blanco, "Le Otorgastes nivel "Insertlima"%d "Insertadmin"de Administracion a "Insertkaki"%s!", Level, Nombre(User));
PlayerPlaySound(User,1056,0.0,0.0,0.0);
GameTextForPlayer(User, "~G~~H~_Promovido", 5000, 6);
}
else return SendClientMessage(playerid, Error, "Error: El jugador no esta conectado!");
}
else return SendClientMessage(playerid, Error, "Error: Usted no es administrador o no tiene suficiente nivel!");
}