[Help]: CreateDynamic3DTextLabel BUG
#1

Hello everyone

I do not know why this happens, bug texts remain and some users have more than one text in the head
If you can help please


My Code

PHP код:
new Text3D:TextUser[MAX_PLAYERS];
//In Disconnect & OnplayerDeath
DestroyDynamic3DTextLabel(TextUser[playerid]);
public 
OnPlayerSpawn(playerid)
{
// Create 3D label
TextUser[playerid] = CreateDynamic3DTextLabel("",-1,0.00.00.52,8.0,playerid);
//Info Text Label Update
new Byt[80],RankVip[20];
switch(
PlayerInfo[playerid][Vip])
{
case 
0RankVip "{FF8040}No";
case 
1RankVip "{00FF80}Lvl 1";
case 
2RankVip "{00FF40}Lvl 2";
}
format(Byt,sizeof(Byt),"RankVip: %s\nLevel: %d\nHeadShoots: %d",RankVip,PlayerInfo[playerid][LevelUp],PlayerInfo[playerid][Hs]);
UpdateDynamic3DTextLabelText(TextUser[playerid],0x808080FF,Byt);
return 
1;

Reply
#2

Hello!

If the players spawn more than one times, the player have also more than one labels above the head.
So, you should set the label maybe 2 seconds later after the spawn (with a timer).

- Mencent
Reply
#3

Thanks
Reply
#4

Make a variable that checks if the player has a textlabel yes or no.
Reply
#5

Quote:
Originally Posted by Glenn332
Посмотреть сообщение
Make a variable that checks if the player has a textlabel yes or no.
Could you give me an example?
Reply
#6

PHP код:
if(GetPVarInt(playerid"LabelAdded") == 1)return 1;
SetPVarInt(playerid,"LabelAdded"1); 
Add these two lines before you create the label
Reply
#7

Quote:
Originally Posted by Glenn332
Посмотреть сообщение
PHP код:
if(GetPVarInt(playerid"LabelAdded") == 1)return 1;
SetPVarInt(playerid,"LabelAdded"1); 
Add these two lines before you create the label
So it should be?

PHP код:
PlayerSpawn(playerid

if(
GetPVarInt(playerid"LabelAdded") == 1)return 1
SetPVarInt(playerid,"LabelAdded"1);
TextUser[playerid] = CreateDynamic3DTextLabel("",-1,0.00.00.52,8.0,playerid); 
return 
1

Reply
#8

Quote:
Originally Posted by INKISICION
Посмотреть сообщение
So it should be?

PHP код:
PlayerSpawn(playerid

if(
GetPVarInt(playerid"LabelAdded") == 1)return 1
SetPVarInt(playerid,"LabelAdded"1);
TextUser[playerid] = CreateDynamic3DTextLabel("",-1,0.00.00.52,8.0,playerid); 
return 
1

Yes.
Reply
#9

Quote:
Originally Posted by Glenn332
Посмотреть сообщение
Yes.
+ Respect For your help
Reply
#10

Quote:
Originally Posted by INKISICION
Посмотреть сообщение
+ Respect For your help
Thanks bud
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)