20.07.2016, 04:15
Hi. I have a textdraw that displays zones. But I want to hide the textdraw whilst in requestclass and whilst dead.
I've tried creating the textdraw under OnPlayerSpawn, however whenever I do that. Once I die, it creates a new one over the top and then bugs the textdraw. I've tried adding TextDrawHideForPlayer under the callback OnPlayerDeath, but it doesn't hide... I've tried TextDrawDestroy, under the callback OnPlayerDeath, it did end up destroying.
However it would only fix it for one player. Then I decided that I'd try change the textdraw to a PlayerText and I managed to get it to work perfectly, but it only works perfectly for one person. If another person joins the server the whole textdraw won't appear.
This is my text draw.
I have it being destroyed under OnPlayerDeath
Does anyone have any ideas?
I've tried creating the textdraw under OnPlayerSpawn, however whenever I do that. Once I die, it creates a new one over the top and then bugs the textdraw. I've tried adding TextDrawHideForPlayer under the callback OnPlayerDeath, but it doesn't hide... I've tried TextDrawDestroy, under the callback OnPlayerDeath, it did end up destroying.
However it would only fix it for one player. Then I decided that I'd try change the textdraw to a PlayerText and I managed to get it to work perfectly, but it only works perfectly for one person. If another person joins the server the whole textdraw won't appear.
This is my text draw.
PHP код:
SetTimer("Zones_Update", 500, 1);
for(new i=0; i<MAX_PLAYERS; i++)
{
Zones[i] = CreatePlayerTextDraw(playerid,6.5, 425.4, "_");
PlayerTextDrawLetterSize(playerid, Zones[i], 0.65, 2.1);
PlayerTextDrawSetOutline(playerid, Zones[i], 1);
}
PHP код:
PlayerTextDrawDestroy(playerid,Zones[playerid]);