[Ajuda] Label em cima de ADM
#1

Olha eu queria um cуdigo pra colocar uma label em cima dos adm.

Sei q existe pq ja vi num server vcs poderia me ajudar?
Reply
#2

meu amigo nгo й textdraw й label
Reply
#3

Tanto fas como coloco
Reply
#4

Usando essa funзгo aqui.

https://sampwiki.blast.hk/wiki/SetPlayerChatBubble
Reply
#5

Voce ta usando Rcon ou enum

Rcon:
Quote:

new string1[5];

if(IsPlayerAdmin(playerid)){
format(string1, sizeof(string1), "ADMIN");
new Text3D:label2 = Create3DTextLabel(string1, 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(label2, playerid, 0.0, 0.0, 0.7);
}else{

}

enum:
Quote:

enum pInfo
{
admin,
};

new PlayerInfo[MAX_PLAYERS][pInfo];
// em onplayerconect ou spawn

if(PlayerInfo[playerid] [admin] >= 1){
new string1[5];
format(string1, sizeof(string1), "ADMIN");
new Text3D:label2 = Create3DTextLabel(string1, 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(label2, playerid, 0.0, 0.0, 0.7);

}else{

}

Reply
#6

Desculpe perguntar mas coloco a onde
Reply
#7

serio ? em OnPlayerSpawn ou OnPlayerConect

Se quiser testa Nгo vai aparece , so se voce tiver testando com um amigo ou um npc para ver os label.

OBS: Nгo tem como voce ver o label porque esta em cima de voce.

_____________ para fazer testes _____________________

se tiver for rcon
OBS: dentro do server
/rcon login sua_senha_rcon
/rcon gmx

se for enum em onplayerconect
PlayerInfo[playerid][admin] == 1;
Reply
#8

с deu
Reply
#9

vк se da agora..

TOPO.
pawn Код:
new Text3D:AdminTexto[MAX_PLAYERS];
OnPlayerConnect
pawn Код:
if(COLOQUEOSEU [playerid] > 0) Delete3DTextLabel(AdminTexto[playerid]);
aqui, quando o admin estiver em modo jogo ou seja > 0 ele vai deletar a label em cima.

pawn Код:
if(PlayerInfo[playerid][Admin] > 0)
        {
        AdminTexto[playerid] = Create3DTextLabel("~ ADMIN ~",-1,30.0,40.0,50.0,40.0,0);
        Attach3DTextLabelToPlayer(AdminTexto[playerid], playerid, 0.0, 0.0, 0.40);
        }
ADICIONA ISSO EM OnPlayerSpawn

pawn Код:
Delete3DTextLabel(AdminText[playerid]);
ISSO NO COMANDO /JOGAR

pawn Код:
AdminText[playerid] = Create3DTextLabel("~ Administradora ~",Admin,30.0,40.0,50.0,40.0,0);
            Attach3DTextLabelToPlayer(AdminText[playerid], playerid, 0.0, 0.0, 0.5);
ISSO NO COMANDO /TRABALHAR

espero ter ajudado.

se seu comando de trabalhar for usado para os dois modo jogo/ modo trabalho..
manda o cod que eu te ajudo.
Reply
#10

Nгo recomendo utilizar TextLabel...

Vocк pode fazer um loop de verificaзгo (utilize um jб existente de seu game-mode), ou adicionar em OnPlayerSpawn.

Use a funзгo como nosso amigo recomendou acima: SetPlayerChatBubble
Ex
Код:
SetPlayerChatBubble(playerid, "Administrador(a)", 0x000000FF, 100.0, tempo_em_ms);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)