SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 28/11/2010, 12:32 AM   #1
GaGlets(R)
Gangsta
 
GaGlets(R)'s Avatar
 
Join Date: Oct 2009
Posts: 932
Reputation: 2
Default OnGameModeExit

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 Code:
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;
}
GaGlets(R) is offline  
Old 28/11/2010, 12:40 AM   #2
iggy1
High-roller
 
iggy1's Avatar
 
Join Date: Mar 2009
Location: One past the end.
Posts: 2,383
Reputation: 235
Default Re: OnGameModeExit

Are you using multiple gamemodes? So gmx will switch?
__________________
Quote:
Originally Posted by Y_Less
That code compiles perfectly, but I can tell you now it won't make me a cup of tea.
"No offense, but you are a stupid asshole." - Ron Burgundy
iggy1 is offline  
Old 28/11/2010, 12:42 AM   #3
GaGlets(R)
Gangsta
 
GaGlets(R)'s Avatar
 
Join Date: Oct 2009
Posts: 932
Reputation: 2
Default Re: OnGameModeExit

Nope. Im not..

Redownloaded old version of foreach now it wont work too... -_-
GaGlets(R) is offline  
Old 28/11/2010, 12:49 AM   #4
iggy1
High-roller
 
iggy1's Avatar
 
Join Date: Mar 2009
Location: One past the end.
Posts: 2,383
Reputation: 235
Default Re: OnGameModeExit

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.
__________________
Quote:
Originally Posted by Y_Less
That code compiles perfectly, but I can tell you now it won't make me a cup of tea.
"No offense, but you are a stupid asshole." - Ron Burgundy
iggy1 is offline  
Old 28/11/2010, 12:55 AM   #5
GaGlets(R)
Gangsta
 
GaGlets(R)'s Avatar
 
Join Date: Oct 2009
Posts: 932
Reputation: 2
Default Re: OnGameModeExit

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 .
GaGlets(R) is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PVars in OnGameModeExit Level147 Bug Reports 17 28/11/2010 12:27 PM
save on ongamemodeexit Fonsie Help Archive 1 14/05/2010 11:58 AM
OnGameModeExit and OnFilterScriptExit BlackFoX Help Archive 1 27/03/2010 07:24 PM
Show Player List OnGameModeExit Almamu Help Archive 2 01/11/2009 02:40 PM


All times are GMT. The time now is 12:34 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.