Speedo Help
#8

its not a good idea to create a textdraw anywhere else than the OnGameModeInit(). the max TD limit (serversided) is 2048. so if you create the 2049-st textdraw, it will fuck up.
despite the extra CPU time needed plus the bandwidth for setting the clients textdraws position, font, shadow, color etc. is not needed when a textdraw exists "forever". try to
Код:
OnGameModeInit(){
new Speedo[MAX_PLAYERS];
pay attention at the middle line. no need to create a new textdraw each time. just set its string...
Код:
format(string, sizeof(string), "MPH: %i", vSpeed);
TextDrawSetString(Speedo[playerid],string);//that instead of destroying, creating again. simply modify it :)
TextDrawShowForPlayer(playerid, Speedo[playerid]);
Reply


Messages In This Thread
Speedo Help - by futuretrucker - 07.06.2011, 22:53
Re: Speedo Help - by StilThere - 07.06.2011, 23:09
Re: Speedo Help - by futuretrucker - 07.06.2011, 23:13
Re: Speedo Help - by StilThere - 07.06.2011, 23:22
Re: Speedo Help - by futuretrucker - 07.06.2011, 23:23
Re: Speedo Help - by Sznupek - 08.06.2011, 06:57
Re: Speedo Help - by StilThere - 08.06.2011, 10:39
Re: Speedo Help - by Babul - 08.06.2011, 13:32
Re: Speedo Help - by StilThere - 08.06.2011, 19:37

Forum Jump:


Users browsing this thread: 1 Guest(s)