08.06.2011, 13:32
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
pay attention at the middle line. no need to create a new textdraw each time. just set its string...
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];
Код:
format(string, sizeof(string), "MPH: %i", vSpeed); TextDrawSetString(Speedo[playerid],string);//that instead of destroying, creating again. simply modify it :) TextDrawShowForPlayer(playerid, Speedo[playerid]);