05.03.2010, 18:39
Fijate si asн como te lo voy a poner acб te anda.. Me imagino que por logica si.
No lo probe, asн que cualquier cosa avisame.. Te le puse una linea para que solo te acepte niveles desde 0 a '6'.. Puedes cambiar el '6'
pawn Код:
dcmd_nivel(playerid,params[])
{
if(PlayerInfo[playerid][pNivel] >= 6)
{
new id;
new nivel;
if(sscanf(params, "ud", id, nivel))
{
SendClientMessage(playerid, Amarillo, "Usa: /Nivel <IdJugador> <Nivel>");
}
else if(IsPlayerConnected(id) && id != INVALID_PLAYER_ID && id != playerid) return SendClientMessage(playerid, Rojo, "**Este jugador no esta conectado.");
else (nivel > 6 || nivel < 0) SendClientMessage(playerid, Rojo, "Solo niveles desde 0 a 6."); // Cambia el 6 para el nivel mayor..
else
{
PlayerInfo[playerid][pNivel] == nivel;
{
new string[256],Nombre[24],ANombre[24]; GetPlayerName(playerid,Nombre,24); GetPlayerName(id,ANombre,24);
format(string,256,"El Administrador %s te ha modificado el nivel a %s.",Nombre,nivel);
SendClientMessage(Azul,string);
PlayerInfo[id][pNivel] = nivel;
}
} return SendClientMessage(playerid, Rojo,"**Este jugador estб desconectado.");
} else {
SendClientMessage(playerid, Rojo,"**ERROR: Tu nivel no es lo suficientemente alto como para usar este comando.");
}
return 1;
}