Bug DestroyDynamic3DTextLabel
#1

Hello, i have a problem in my script with DestroyDynamic3DTextLabel.

When a player die, i create a Dynamic3DTextLabel with [dead] above the player head. But when he respawn (OnPlayerSpawn is called) the Dynamic3DTextLabel doesn't disappear.

Here is my script: https://pastebin.com/8XSxGP1N
Reply
#2

PHP код:
It must be OnPlayerSpawn(playerid)
{
      
DestroyDynamic3DTextLabel(DeadScris[playerid]);
return 
1;
}
OnPlayerDeath(playeridkilleridreason)
{
    
DeadScris[playerid] = CreateDynamic3DTextLabel("{337BF0}[dead]"COLOR_WHITE00, -2020playerid);
    
Streamer_SetFloatData(STREAMER_TYPE_3D_TEXT_LABELDeadScris[playerid] , E_STREAMER_ATTACH_OFFSET_Z0.31);
return 
1;

Hope it help
Reply
#3

I know man, it was just an example I know how need to be OnPlayerSpawn / OnPlayerDeath. But my problem is in my script with Create and Destroy the 3dTextlabel..
Reply
#4

use this instead. It will hide the textlabel, so you need not Destroy and create these labels each time on.

UpdateDynamic3DTextLabelText(label, -1, "");
Reply
#5

Nope, it not working, the text doesn't hide/destroy.
Reply
#6

Bump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)