3dTextLabel above head
#1

Hi, i did this:

Код:
if(PlayerInfo[playerid][pAdmin] > 1)
        {
        TitleLabel[playerid] = Create3DTextLabel("< Admin >", COLOR_WHITE, 30.0, 40.0, 50.0, 40.0, 0);
    	Attach3DTextLabelToPlayer(TitleLabel[playerid], playerid, 0.0, 0.0, 0.5);
        }
But if are 2 players connected, its show "<admin>" just for one ..
So, my code works just for 1 player. What is wrong?
Reply
#2

https://sampwiki.blast.hk/wiki/Attach3DTextLabelToPlayer

Quote:

This feature is known to be buggy please consider using the streamer plugin to attach 3D text labels

Reply
#3

I use last version streamer, same problem..
Reply
#4

wiki.sa-mp.com/wiki/SetPlayerChatBubble is a nice way to do it
Reply
#5

I want to do this with 3dtext, i saw this on many servers, i use chatbubble for another thing.
Reply
#6

im new to scripting but ill try to help try somehting like this


Код:
new Text3D:label[MAX_PLAYERS];
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
label[playerid] = CreateDynamic3DTextLabel("Admin", COLOR, x, y, z+1, INVALID_PLAYER_ID, 1);
Reply
#7

@Trucido: You'd have to set attachedplayer parameter to playerid instead of INVALID_PLAYER_ID. Also the parameters you used above are the old ones, update streamer plugin.

pawn Код:
native Text3D:CreateDynamic3DTextLabel(const text[], color, Float:x, Float:y, Float:z, Float:drawdistance, attachedplayer = INVALID_PLAYER_ID, attachedvehicle = INVALID_VEHICLE_ID, testlos = 0, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 100.0);
pawn Код:
// I hope you didn't try to create the 3D label on connect
new Float: x, Float: y, Float: z;
GetPlayerPos(playerid, x, y, z);
TitleLabel[playerid] = CreateDynamic3DTextLabel("< Admin >", -1, x, y, z, 40.0, playerid);
Reply
#8

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
@Trucido: You'd have to set attachedplayer parameter to playerid instead of INVALID_PLAYER_ID. Also the parameters you used above are the old ones, update streamer plugin.

pawn Код:
native Text3D:CreateDynamic3DTextLabel(const text[], color, Float:x, Float:y, Float:z, Float:drawdistance, attachedplayer = INVALID_PLAYER_ID, attachedvehicle = INVALID_VEHICLE_ID, testlos = 0, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 100.0);
pawn Код:
// I hope you didn't try to create the 3D label on connect
new Float: x, Float: y, Float: z;
GetPlayerPos(playerid, x, y, z);
TitleLabel[playerid] = CreateDynamic3DTextLabel("< Admin >", -1, x, y, z, 40.0, playerid);
no i didnt but anyways if i even tried to use the new streamer my pawn just crashes so ye
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)