09.10.2014, 15:07
The title says all my problem , after 15-20+ players , the textdraws aren't showing anymore.And i putted to destroy all the textdraws on disconnect to don't reach the limit of textdraws..
My OnPlayerDisconnect:
Ongamemodeexit:
Those all my textdraws..
My OnPlayerDisconnect:
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
#if defined DEBUG
printf("[debug] OnPlayerDisconnect(%d, %d)", playerid, reason);
#endif
SetPlayerName(playerid, playerVariables[playerid][pNormalName]);
TextDrawDestroy(Linie[playerid]);
TextDrawDestroy(ButonInapoi[playerid]);
TextDrawDestroy(ButonUrmator[playerid]);
TextDrawDestroy(DealerMasina[playerid]);
TextDrawDestroy(DealerPret[playerid]);
TextDrawDestroy(ButonCumpara[playerid]);
TextDrawDestroy(ButonTesteaza[playerid]);
TextDrawDestroy(ButonAnuleaza[playerid]);
TextDrawDestroy(tTimer[playerid]);
TextDrawDestroy(DMV1[playerid]);
TextDrawDestroy(DMV2[playerid]);
TextDrawDestroy(TUT69[playerid]);
pawn Код:
public OnGameModeExit() {
#if defined DEBUG
print("[debug] OnGameModeExit()");
#endif
KillTimer(unjailtimer);
KillTimer(messtimer);
KillTimer(findtimer);
KillTimer(checkcartimer);
KillTimer(checkgastimer);
new x;
while(x < MAX_TIMERS) {
KillTimer(scriptTimers[x]);
x++;
}
mysql_close(databaseConnection);
TextDrawDestroy(Time);
TextDrawDestroy(Date);
TextDrawDestroy(Textdraw1);
TextDrawDestroy(Textdraw0);
TextDrawDestroy(Textdraw2);
TextDrawDestroy(Textdraw3);
TextDrawDestroy(Textdraw4);
TextDrawDestroy(Textdraw5);
return 1;
}