Put a word above player's head
#1

Hello, a question : How can I put a word like newbie or helper above the player's head ?
Thanks to help me again !!
Reply
#2

Use:

Create3DTextLabel

and

Attach3DTextLabelToPlayer

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

thank you very much Sasino (again)
Reply
#4

I have a new problem cause I try to display the rank of the player above the head's player

pawn Код:
label[playerid] = Create3DTextLabel("%S",0x008080FF,30.0,40.0,50.0,40.0,0 ,rank);
    Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.7);
    return 1;
When compiling it say "error 035: argument type mismatch (argument " at the line

label[playerid] = Create3DTextLabel("%S",0x008080FF,30.0,40.0,50.0,4 0.0,0 ,rank);

What is meaning ?
Reply
#5

Quote:
Originally Posted by Sn4ke
Посмотреть сообщение
I have a new problem cause I try to display the rank of the player above the head's player

pawn Код:
label[playerid] = Create3DTextLabel("%S",0x008080FF,30.0,40.0,50.0,40.0,0 ,rank);
    Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.7);
    return 1;
When compiling it say "error 035: argument type mismatch (argument " at the line

label[playerid] = Create3DTextLabel("%S",0x008080FF,30.0,40.0,50.0,4 0.0,0 ,rank);

What is meaning ?
It means that the 8th argument can't be "rank", but true or false:

pawn Код:
new string[41];
format(string,sizeof(string),"%s",rank);
Create3DTextLabel(string,0x008080FF,30.0,40.0,50.0,40.0,0 ,0); //Argument 8 must be 0(false) or 1(true)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)