Dynamic3DText wont remove from players - appearing on random ones. - 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: Dynamic3DText wont remove from players - appearing on random ones. (
/showthread.php?tid=618280)
Dynamic3DText wont remove from players - appearing on random ones. -
Dokins - 03.10.2016
http://prnt.sc/cpexr6
This has been happening a lot. I clear it when people leave the server and when people join and it does nothing.
pawn Код:
UpdateDynamic3DTextLabelText(DeathLabel[playerid], -1, " ");
DestroyDynamic3DTextLabel(DeathLabel[playerid]);
Both of this has been removed under OnPlayerDisconnect and OnPlayerConnect.
Re: Dynamic3DText wont remove from players - appearing on random ones. -
oMa37 - 03.10.2016
Check where you are creating/updating it and post here the codes.
Re: Dynamic3DText wont remove from players - appearing on random ones. -
Dokins - 03.10.2016
pawn Код:
new string[128];
format(string, sizeof(string), "D E A D\nB O D Y");
DeathLabel[playerid] = CreateDynamic3DTextLabel(string, COLOUR_REALRED, 0.0, 0.0, -0.5, 50.0, playerid, INVALID_VEHICLE_ID);
format(string, sizeof(string), "You have "COL_RED"died."COL_WHITE" Please assist players with the use of "COL_GREEN"'/do' "COL_WHITE"and do not "COL_RED"RK.");
SendClientMessage(playerid, COLOUR_WHITE, string);
Re: Dynamic3DText wont remove from players - appearing on random ones. -
Logic_ - 03.10.2016
Debugging?
--
Try doing the following...
OnPlayerConnect
- (Re)Create it
- Update the label
- print the result of the label
OnPlayerSpawn / OnPlayerDeath
- Update the label
Re: Dynamic3DText wont remove from players - appearing on random ones. -
PrO.GameR - 04.10.2016
You are probably clearing the variable before destroying it, effectively losing the ID.
Check for DeathLabel[playerid] variable getting changed or check for recreation of the deathlabel when there is one already there.
Re: Dynamic3DText wont remove from players - appearing on random ones. -
Dokins - 05.10.2016
I've checked that a billion times to no avail.