[AYUDA] Crear niveles.
#7

Fijate si asн como te lo voy a poner acб te anda.. Me imagino que por logica si.

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;
}
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'
Reply


Messages In This Thread
[AYUDA] Crear niveles. - by CristianTdj - 05.03.2010, 13:33
Re: [AYUDA] Crear niveles. - by xenowort - 05.03.2010, 14:27
Re: [AYUDA] Crear niveles. - by elvago - 05.03.2010, 14:43
Re: [AYUDA] Crear niveles. - by CristianTdj - 05.03.2010, 15:17
Re: [AYUDA] Crear niveles. - by CristianTdj - 05.03.2010, 15:19
Re: [AYUDA] Crear niveles. - by xenowort - 05.03.2010, 16:06
Re: [AYUDA] Crear niveles. - by elvago - 05.03.2010, 18:39
Re: [AYUDA] Crear niveles. - by CristianTdj - 06.03.2010, 10:59
Re: [AYUDA] Crear niveles. - by xenowort - 06.03.2010, 13:00
Re: [AYUDA] Crear niveles. - by Miguel - 06.03.2010, 16:09

Forum Jump:


Users browsing this thread: 1 Guest(s)