08.06.2012, 06:32
(
Последний раз редактировалось swindle69; 08.06.2012 в 09:43.
Причина: Solved the issue.
)
Hello im having a few issues with text draws.
I would post the full code but its pretty straight forward.
I just have two public functions calling information from a database and then displaying the results in a text draw.
These public functions are on a timer (every 3 seconds).
Everything compiles fine but when i connect to the server i see the two text draws constantly flashing. Its as if the TextDrawDestroy() is killing both public functions.
Hes one example of my public functions.
So im worndering if theres something better then TextDrawDestroy? like a TextDrawupdate?
or
am i going about this all wrong?
Thanks for any feedback! + Rep etc
I would post the full code but its pretty straight forward.
I just have two public functions calling information from a database and then displaying the results in a text draw.
These public functions are on a timer (every 3 seconds).
Everything compiles fine but when i connect to the server i see the two text draws constantly flashing. Its as if the TextDrawDestroy() is killing both public functions.
Hes one example of my public functions.
Код:
public GPS(playerid)
{
new zone[MAX_ZONE_NAME], Text:GPS_UPDATE, textbox_gps[128], query[300], zone_speed[128];
GetPlayer2DZone(playerid, zone, MAX_ZONE_NAME);
format(query, sizeof(query), "SELECT * FROM zone_speeds WHERE location_name='%s'", zone);
mysql_query(query);
mysql_store_result();
while(mysql_fetch_row_format(query,"|"))
{
mysql_fetch_field_row(zone_speed, "zonespeed");
}
format(textbox_gps, sizeof(textbox_gps), "Location: %s SPEED: %s", zone, zone_speed);
TextDrawDestroy(Text:GPS_UPDATE);
GPS_UPDATE = TextDrawCreate(5.0, 428.0, textbox_gps);
TextDrawUseBox(GPS_UPDATE, 0);
TextDrawShowForPlayer(playerid, GPS_UPDATE);
return true;
}
or
am i going about this all wrong?
Thanks for any feedback! + Rep etc

