Textdraws dissappear
#1

Hello guys. I've got a problem with my textdraws.. After 3-4 hours after the restart they dissappear. I create them on onplayerconnect, destroy them on onplayerdisconnect and update them every second with a custom timer.

Codes:

At top of the script:
pawn Код:
new Text:TextDrawSZ[MAX_PLAYERS];

In OnPlayerConnect:
pawn Код:
TextDrawSZ[playerid] = TextDrawCreate(89.000000, 430.000000, "SafeZone");
TextDrawAlignment(TextDrawSZ[playerid], 2);
TextDrawBackgroundColor(TextDrawSZ[playerid], 255);
TextDrawFont(TextDrawSZ[playerid], 2);
TextDrawLetterSize(TextDrawSZ[playerid], 0.230000, 1.000000);
TextDrawColor(TextDrawSZ[playerid], -1);
TextDrawSetOutline(TextDrawSZ[playerid], 1);
TextDrawSetProportional(TextDrawSZ[playerid], 1);

TextDrawHideForPlayer(playerid, TextDrawSZ[playerid]);
In OnPlayerDisconnect:
pawn Код:
TextDrawDestroy(TextDrawSZ[playerid]);
In a custom timer repeating every second:
pawn Код:
if(IsPlayerInArea(i, 1432.823, 1546.908, -2360.873, -2234.546) || IsPlayerInArea(i, 1402.4, 1577.33, -1863.458, -1737.13) || IsPlayerInArea(i, 1444.231, 1535.499, -1745.026, -1602.907) || IsPlayerInArea(i, 1398.597, 1516.485, -1038.38, -991.0071)) { TextDrawShowForPlayer(i, TextDrawSZ[i]); TextDrawShowForPlayer(i, TextDrawSZ1[i]); if(AdminDuty[i] == 0 && !IsACop(i) && !IsAMedic(i)) SetPlayerArmedWeapon(i,0); }
Is it wrong that I update them every second?
And, if it helps: After some of them dissappear, the ID of other textdraws mix.. For example i type "/logo on" which sets visible only one textdraw, but sets visible two of them. Or i type "/logo off" to hide a textdraw but it hides another one instead of the one i wanted.
Reply


Messages In This Thread
Textdraws dissappear - by CONTROLA - 20.05.2012, 07:32
Re: Textdraws dissappear - by $$inSane - 20.05.2012, 07:37
Re: Textdraws dissappear - by CONTROLA - 20.05.2012, 07:38
Re: Textdraws dissappear - by JaKe Elite - 20.05.2012, 07:40
Re: Textdraws dissappear - by iggy1 - 20.05.2012, 07:41
Re: Textdraws dissappear - by CONTROLA - 20.05.2012, 07:44
Re: Textdraws dissappear - by iggy1 - 20.05.2012, 07:50
Re: Textdraws dissappear - by CONTROLA - 20.05.2012, 07:52
Re: Textdraws dissappear - by iggy1 - 20.05.2012, 07:56
Re: Textdraws dissappear - by $$inSane - 20.05.2012, 08:00

Forum Jump:


Users browsing this thread: 1 Guest(s)