[Duda] Nivel de VIP en la cabeza (LAdmin4v2)
#1

Saludos...

Verбn yo uso un LAdmin modificado por mi y hace poco le agreguй un sistema VIP...

Ahora el problema viene en que hay muchos VIPs conectados a veces y la lista de VIPs se llena y se ve un poco mal y es molesto; asн que me preguntaba si hay alguna forma de que con el ladmin, al spawnear, salga el nivel de VIP en la cabeza del jugador.

Y tambiйn si se podrнa hacer lo mismos con los admins del servidor.

Gracias de antemano! ^^
Reply
#2

https://sampwiki.blast.hk/wiki/Create3DTextLabel
https://sampwiki.blast.hk/wiki/Attach3DTextLabelToPlayer
https://sampwiki.blast.hk/wiki/UpdatePlayer3DTextLabelText
Reply
#3

Lo sй, pero me gustarнa algo un poco mбs detallado :$
Reply
#4

lo que usted quiere es que le pasen el cуdigo si es asн valla a pedidos!

para crear lo que usted desea necesita las funciones que la acaba de mostrar Otacon solo con unas cuantas
restricciones haces tu cуdigo perfecto!
Reply
#5

mira isto

https://sampforum.blast.hk/showthread.php?tid=466711
Reply
#6

Al conectar al servidor se deberнa crear un label de jugador, y al desconectar, se eliminarнa.

Al spawnear por primera vez se deberнa actualizar la informaciуn del label segъn los datos del jugador.


pawn Код:
// Variable contenedora de los datos
new PlayerText3D:infoDatos[MAX_PLAYERS];

// Saber cuantas veces ha spawneado
new infoSpawns[MAX_PLAYERS];

// Definidos; configuraciуn del pequeсo sistema
#define DISTANCIA_VISUALIZAR 10.0 // Distancia que se visualizarб el label
#define varAdmin[%0] pInfo[%0][admin] // Variable contenedora del nivel administrativo del jugador
#define varVip[%0] pInfo[%0][vip] // Variable que retorna el nivel de vip de un jugador

public OnPlayerConnect(playerid)
{
    // Dice que no ha spawneado nunca
    infoSpawns[playerid] = 0;
   
    return 1;
}

public OnPlayerSpawn(playerid)
{
    // Aumenta las veces que ha spawneado
    infoSpawns[playerid]++;
   
    if(infoSpawns[playerid] == 1)
    {
        // Si es la primera vez que spawnea
       
        // Vaciamos la variable contenedora del texto que tendrб el label
        new
            infoTexto[88],
            bool:crear;
       
        // Formamos el cуdigo para el nivel administrativo
        if(varAdmin[playerid] >= 1)
        {
            format(infoTexto, sizeof(infoTexto), "Admi. %d", varAdmin[playerid]);
           
            crear = true;
        }
       
        // Agregamos el cуdigo de nivel vip
        if(varVip[playerid] >= 1)
        {
            format(infoTexto, sizeof InfoTexto, "%s\nVip. %d", infoTexto, varVip[playerid]);
           
            crear = true;
        }
       
        // Creamos el label
        if(crear == true) infoDatos[playerid] = CreatePlayer3DTextLabel(playerid, "_", -1, 0.0, 0.0, 0.0+(DISTANCIA_VISUALIZAR*2.0), DISTANCIA_VISUALIZAR, playerid);
    }
   
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    // Eliminamos el label
    DeletePlayer3DTextLabel(playerid, infoDatos[playerid]);
   
    return 1;
}
Lee las macros y modifica segъn la configuraciуn de tu script.
Reply
#7

Hice esto:

Quote:

forward TextPlayer();
public TextPlayer()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pVip] == 1)
{
DeletePlayer3DTextLabel(playerid, infoDatos[playerid]);
SetPlayerChatBubble(i, "Usuario VIP [1]", 0x86DD63FF, 100.0, 10000);
}
if(PlayerInfo[i][pVip] == 2)
{
SetPlayerChatBubble(i, "Usuario VIP [2]", 0x86DD63FF, 100.0, 10000);
}
if(PlayerInfo[i][pVip] == 3)
{
SetPlayerChatBubble(i, "Usuario VIP [3]", 0x86DD63FF, 100.0, 10000);
}
if(PlayerInfo[i][pVip] == 4)
{
SetPlayerChatBubble(i, "Usuario VIP [4]", 0x86DD63FF, 100.0, 10000);
}
if(PlayerInfo[i][pVip] == 5)
{
SetPlayerChatBubble(i, "Usuario VIP [5]", 0x86DD63FF, 100.0, 10000);
}
}
}

Pero sй que se bugearб y me gustarнa saber como borrar el chat bubble, osea cuando subas de nivel VIP se borre el anterior y se cambie por otro.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)