SA-MP Forums Archive
Bug DestroyDynamic3DTextLabel - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Bug DestroyDynamic3DTextLabel (/showthread.php?tid=639267)



Bug DestroyDynamic3DTextLabel - None1337 - 14.08.2017

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


Re: Bug DestroyDynamic3DTextLabel - mmostafa - 14.08.2017

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


Re: Bug DestroyDynamic3DTextLabel - None1337 - 14.08.2017

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..


Re: Bug DestroyDynamic3DTextLabel - verlaj - 14.08.2017

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

UpdateDynamic3DTextLabelText(label, -1, "");


Re: Bug DestroyDynamic3DTextLabel - None1337 - 14.08.2017

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


Re: Bug DestroyDynamic3DTextLabel - None1337 - 17.08.2017

Bump