Dynamic3DText wont remove from players - appearing on random ones.
#1

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.
Reply
#2

Check where you are creating/updating it and post here the codes.
Reply
#3

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);
Reply
#4

Debugging?

--

Try doing the following...

OnPlayerConnect
- (Re)Create it
- Update the label
- print the result of the label

OnPlayerSpawn / OnPlayerDeath
- Update the label
Reply
#5

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.
Reply
#6

I've checked that a billion times to no avail.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)