27.11.2010, 23:32
My OnGameModeExit freezes server, if that callback gets called server wont respond anymore it would work/show server ping in server list etc but if that was called and i`m trying to reconnect it will connect but wont respond anymore...
If i`m not wrong then everything was fine till i changed foreach to newer one... Code have not been changed in OnPropUpdate for a while so it worked earlier..
If i`m not wrong then everything was fine till i changed foreach to newer one... Code have not been changed in OnPropUpdate for a while so it worked earlier..
pawn Код:
public OnGameModeExit()
{
OnPropUpdate(10);
foreach (Player, i)
{
TextDrawDestroy(VHS[i]);
DeletePVar(i,"VehON");
DeletePVar(i,"enabledlight");
DeletePVar(i,"allowedd");
DeletePVar(i,"seatbelt");
DeletePVar(i,"pingwarn");
DeletePVar(i,"nosactive"); DeletePVar(i,"BHed");
DeletePVar(i,"pee"); DeletePVar(i,"wronga");
DeletePVar(i,"failedtest"); DeletePVar(i,"likis");
DeletePVar(i,"logged"); DeletePVar(i,"fueling");
OnPlayerDisconnect(i,2);
}
for(new i = 0; i < sizeof(iPickups); i++){
DestroyObject(iPickups[i][0]);
DestroyPickup(iPickups[i][1]);
DestroyPickup(iPickups[i][2]);
DestroyPickup(iPickups[i][3]);
DestroyPickup(iPickups[i][4]);
}
KillTimer(synctimer);
KillTimer(unjailtimer);
KillTimer(othtimer);
KillTimer(checkgastimer);
KillTimer(idletimer);
KillTimer(productiontimer);
KillTimer(checkcarhealthtimer);
KillTimer(CheckStatusTimer);
DestroyAllDynamicMapIcons();
DestroyAllDynamicCPs();
DestroyAllDynamicObjects();
DestroyAllDynamicPickups();
DestroyMenu(Guide);
return 1;
}