3d text labels
#1

Hello, can i attach one 3DTextLabel to multiple players?

like:

Код:
new Text3D:label = Create3DTextLabel("Example text", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
Код:
Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, 0.7);
Attach3DTextLabelToPlayer(label, killerid, 0.0, 0.0, 0.7);
Or when i attach it to the next player the first one gets deleted?
Reply
#2

You could do new Text3D:label[MAX_PLAYERS];
Then onconnect
label[playerid] = Create3DTextLabel("Example text", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.7);

Not sure though.
Reply
#3

Thats looks like it should work, ill test it now.
Reply
#4

well, why not:
PHP код:
new Text3D:label[MAX_PLAYERS];
public 
OnPlayerConnect(playerid)
{
label[playerid] = Create3DTextLabel(" ", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
return 
1;
}
public 
OnPlayerDeath(playerid, killerid, reason)
{
        
Update3DTextLabelText(label[playerid], 0x008080FF, "Example text");
        
Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.7);

        
Update3DTextLabelText(label[killerid], 0x008080FF, "Example text");
        
Attach3DTextLabelToPlayer(label[killerid], killerid, 0.0, 0.0, 0.7);
        return 
1;
} 
Reply
#5

Thanks a lot guys

+rep
Reply
#6

Btw, is it possible to have wanted stars in 3d text labels, like in gametext?
Reply
#7

Quote:
Originally Posted by Cheesus
Посмотреть сообщение
Btw, is it possible to have wanted stars in 3d text labels, like in gametext?
No, but, you can always do something like:
PHP код:
new tlabel[67];
format(tlabel, 67, "[Wanted Level: %d]", GetWantedLevel(playerid)); 
Reply
#8

K thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)