OnGameModeExit - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: OnGameModeExit (
/showthread.php?tid=193915)
OnGameModeExit -
GaGlets(R) - 27.11.2010
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..
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;
}
Re: OnGameModeExit -
iggy1 - 27.11.2010
Are you using multiple gamemodes? So gmx will switch?
Re: OnGameModeExit -
GaGlets(R) - 27.11.2010
Nope. Im not..
Redownloaded old version of foreach now it wont work too... -_-
Re: OnGameModeExit -
iggy1 - 27.11.2010
When the server doesn't respond have you tryed quitting and re-connecting?
EDIT: Reason i ask is iv never called OnPlayerDisconnect like that (or seen it), and i think that might stop you from connecting (just a theory). Also if a player disconnects PVars delete automaticaly.
Re: OnGameModeExit -
GaGlets(R) - 27.11.2010
Nope ... i saw the same scripting way in CleanScript GM.. :P
in fact i removed that and tried again - nothing..
Yes i tried reconnect but after connecting it freezes my client so it shows
Connected to ...
nothing else just freezed .