OnGameModeExit
#1

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;
}
Reply
#2

Are you using multiple gamemodes? So gmx will switch?
Reply
#3

Nope. Im not..

Redownloaded old version of foreach now it wont work too... -_-
Reply
#4

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.
Reply
#5

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 .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)