Server Crash when a player exits the game
#1

Hi all.I have a problem here with my GM...If someone is playing on my server and he quits the game it crashes...Or if the Connection is closed between the player and the server (kicked/banned/ game quitted with /q or simply in pause menu) the server crashes too...In the log i have nothing the last line is only the connecting: X_Y incoming connection IP *.*.*.* And there isnt a message i can know why it is crashing...I have only the crashlog.txt that contains this...


pawn Код:
--------------------------

SA-MP Server: 0.3c



Exception At Address: 0x004A2D7B



Registers:

EAX: 0x0013F2C4 EBX: 0x00000000 ECX: 0x00000000 EDX: 0x00324B08

ESI: 0x00000000 EDI: 0x0165F5F0 EBP: 0x0013F2D4 ESP: 0x0013F2AC

EFLAGS: 0x00010286



Stack:

+0000: 0x0165F5F0   0x02066374   0x00000000   0xFFFFFFFF

+0010: 0x0013F2AC   0x0013EED8   0x0013FE38   0x004A6BC4

+0020: 0x004C1208   0xFFFFFFFF   0x01D3B77C   0x0040591D

+0030: 0x00000000   0x00402C20   0x0165F5F0   0x0238EB14

+0040: 0x0013F798   0x00000000   0x0238EE34   0x0165F5F0

+0050: 0x00000000   0x0032879C   0x003287A0   0x00328AB4

+0060: 0x00324B08   0x003287AC   0x00324B08   0x01D33D88

+0070: 0x02066374   0x00000000   0x01D30020   0x003325EC

+0080: 0x0048782E   0x0165F5F0   0x0013F788   0x0000013E

+0090: 0x00006464   0x65727453   0x72656D61   0x506E4F5F

+00A0: 0x6579616C   0x73694472   0x6E6E6F63   0x00746365

+00B0: 0x0165F5F0   0x0165F5F0   0x01D33D88   0x00000000

+00C0: 0x00000000   0x00000000   0x00000000   0x00000000

+00D0: 0x00000000   0x00000000   0x00000000   0x00000000

+00E0: 0x00000000   0x00000000   0x00000000   0x00000000

+00F0: 0x00000000   0x00000000   0x00000000   0x00487500

+0100: 0x0165F5F0   0x02066374   0x00000000   0x00000000

+0110: 0x00000000   0x00000000   0x00000000   0x00000000

+0120: 0x00000000   0x00000000   0x7C936C9B   0x7C943C4E

+0130: 0xFFFFFFFF   0x0013F41C   0x00000205   0x0013F40C
I dont know whats this mean...Can Kalcor or someone say it to me why its crashing all the time? :/ Im so confused...
Reply
#2

Show us your functions in the OnPlayerDisconnect callback
Reply
#3

Код:
public OnPlayerDisconnect(playerid, reason)
{
	if(IsPlayerNPC(playerid))
	{
	    new npcname[MAX_PLAYER_NAME], tarolo[128];
	    GetPlayerName(playerid, npcname, sizeof(npcname));
	    format(tarolo, sizeof(tarolo), "NPC %s lecsatlakozott...", npcname);
	    RemoveWeaponsFile(playerid);
	}
	if(reason == 0 || reason == 1) // Crashed or Logged
	{
 		SaveWeaponsToFile(playerid);
	}
	if(reason == 2) // Kicked/Banned
	{
	    RemoveWeaponsFile(playerid);
	}
	if(PlayerInfo[playerid][swot] == 1)
	{
		DestroyObject(PlayerInfo[playerid][swo]);
		PlayerInfo[playerid][swot] = 0;
	}
	if(PlayerInfo[playerid][swot] == 1)
	{
		DestroyObject(PlayerInfo[playerid][swo]);
		DestroyObject(PlayerInfo[playerid][swo1]);
	}
//	KillTimer(egestimer[playerid]);
//	DestroyCellTextDraws(playerid);
//	HavingBall[playerid] = 0;
//    Anim[playerid] = 0;
//	DestroyCellTextDraws(playerid);
	TextDrawDestroy(tutszoveg[playerid]);
	TextDrawDestroy(tuthead[playerid]);
	if(PlayerInfo[playerid][isCestisObj] == 1)
	{
		DestroyDynamicObject(PlayerInfo[playerid][CestisObj]);
		DestroyDynamicObject(PlayerInfo[playerid][CestisObj1]);
		DestroyDynamicObject(PlayerInfo[playerid][CestisObj2]);
		DestroyDynamicObject(PlayerInfo[playerid][CestisObj3]);
		DestroyDynamicObject(PlayerInfo[playerid][CestisObj4]);
		DestroyDynamicObject(PlayerInfo[playerid][CestisObj5]);
		DestroyDynamicObject(PlayerInfo[playerid][CestisObj6]);
		DestroyDynamicObject(PlayerInfo[playerid][CestisObj7]);
		DestroyDynamicObject(PlayerInfo[playerid][CestisObj8]);
		PlayerInfo[playerid][isCestisObj] = 0;
	}
	KillTimer(KeyTimer[playerid]);
	DestroyPlayerHUD(playerid);
    autosuli[playerid] = 0;
    TextDrawDestroy(TextDrawInfoBox[playerid]);
//    pilotaengedely[playerid] = 0;
//    if(HavingBall[playerid]) Baller = 999;
	//-=============Pozнciу mentйs by SilentHunter================-
	new Float:x;
	new Float:y;
	new Float:z;
    GetPlayerPos(playerid,x,y,z);
    PlayerInfo[playerid][pPos_x] = x;
    PlayerInfo[playerid][pPos_y] = y;
    PlayerInfo[playerid][pPos_z] = z;
    PlayerInfo[playerid][intmentes] = GetPlayerInterior(playerid);
    PlayerInfo[playerid][virtualisvilag] = GetPlayerVirtualWorld(playerid);
    //-============================================================-
	HidePlayerHUD(playerid);
	DestroyPlayerHUD(playerid);
	HideHUD(playerid);
    //HideRXTT(playerid);
	if(MedicBill[playerid] > 0){MedicBill[playerid] = 0;}
	gActivePlayers[playerid]--;
	numplayers--;
	KillTimer(TextTimer[playerid]);
	PlayerInfo[playerid][pAdjustable] = 1;
	ApprovedWeapons[playerid] = 0;
	OnPlayerSave(playerid);
//	KillTimer(BlinkTime[playerid]);
	Freeze[playerid] = false;
	OnPlayerCommandText(playerid,"/standart");
	if(PlayerInfo[playerid][pCarKeys] != 9999)
	{
	    carKeys[playerid] = 9999; // Prevent owner's car from getting taken.
	}
	MedicBill[playerid] = 0;
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
	    if(IsPlayerConnected(i))
	    {
	        if(TaxiAccepted[i] < 999)
	        {
		        if(TaxiAccepted[i] == playerid)
		        {
		            TaxiAccepted[i] = 999;
		            GameTextForPlayer(i, "~w~A kliens~n~~r~visszavonta~w~ a hнvбst", 5000, 1);
		            TaxiCallTime[i] = 0;
		            DisablePlayerCheckpointEx(i);
		        }
	        }
	        else if(BusAccepted[i] < 999)
	        {
		        if(BusAccepted[i] == playerid)
		        {
		            BusAccepted[i] = 999;
		            GameTextForPlayer(i, "~w~A kliens~n~~r~visszavonta~w~ a hнvбst", 5000, 1);
		            BusCallTime[i] = 0;
		            DisablePlayerCheckpointEx(i);
		        }
	        }
	    }
	}
	if(RequestingBackup == playerid)
	{
		RequestingBackup = 999;
		for(new ra=0; ra<MAX_PLAYERS; ra++)
		{
			if(IsPlayerConnected(ra))
			{
				if(IsALawEnforcer(ra))
				{
					DisablePlayerCheckpointEx(ra);
				}
			}
		}
	}
	if(GettingCK[playerid] < 999)
	{
	    if(IsPlayerConnected(GettingCK[playerid]))
	    {
	        SendClientMessage(GettingCK[playerid], COLOR_SACBLUE, "A szerver karakterhalбlt osztott ki a karakteredre.");
	        SendClientMessage(GettingCK[playerid], COLOR_SACBLUE, "Ez azt jelenti hogy ezzel a karaktereddel mбr nem jбtszhatsz ezen a szerveren.");
	        SendClientMessage(GettingCK[playerid], COLOR_SACBLUE, "Lйpj kapcsolatba az egyik Adminisztrбtorral az ъjra regisztrбlбsoddal kapcsolatban.");
	        OnCK[GettingCK[playerid]] = 999;
	    }
	}
	if(TransportCost[playerid] > 0 && TransportDriver[playerid] < 999)
	{
	    if(IsPlayerConnected(TransportDriver[playerid]))
		{
		    new string[64];
		    TransportMoney[TransportDriver[playerid]] += TransportCost[playerid];
		    TransportTime[TransportDriver[playerid]] = 0;
		    TransportCost[TransportDriver[playerid]] = 0;
		    format(string, sizeof(string), "~w~Kiszбllt az utas~n~~g~Ъti dнj %s",ConvertToMoney(TransportCost[playerid]));
		    GameTextForPlayer(TransportDriver[playerid], string, 5000, 1);
		}
	}
	if(GotHit[playerid] > 0)
	{
	    if(GetChased[playerid] < 999)
	    {
	        if(IsPlayerConnected(GetChased[playerid]))
	        {
	        	SendClientMessage(GetChased[playerid], COLOR_SACBLUE, "Eltűnt a cйlpont.");
	            GoChase[GetChased[playerid]] = 999;
			}
	    }
	}
	if(PlayerBoxing[playerid] > 0)
	{
	    if(Boxer1 == playerid)
	    {
	        if(IsPlayerConnected(Boxer2))
	        {
	        	PlayerBoxing[Boxer2] = 0;
	        	SetPlayerPos(Boxer2, 765.8433,3.2924,1000.7186);
	        	SetPlayerInterior(Boxer2, 5);
	        	GameTextForPlayer(Boxer2, "~r~Meccs megszakнtva", 5000, 1);
			}
	    }
	    else if(Boxer2 == playerid)
	    {
	        if(IsPlayerConnected(Boxer1))
	        {
	        	PlayerBoxing[Boxer1] = 0;
	        	SetPlayerPos(Boxer1, 765.8433,3.2924,1000.7186);
	        	SetPlayerInterior(Boxer1, 5);
	        	GameTextForPlayer(Boxer1, "~r~Meccs megszakнtva", 5000, 1);
			}
	    }
	    InRing = 0;
     	RoundStarted = 0;
		Boxer1 = 9999;
		Boxer2 = 9999;
		TBoxer = 9999;
	}
    if(TransportDuty[playerid] == 1)
	{
		TaxiDrivers -= 1;
	}
    else if(TransportDuty[playerid] == 2)
	{
		BusDrivers -= 1;
	}
	if(PlayerInfo[playerid][pJob] == 11)
	{
	    if(JobDuty[playerid] == 1) { Medics -= 1; }
	}
	else if(PlayerInfo[playerid][pJob] == 7)
	{
	    if(JobDuty[playerid] == 1) { Mechanics -= 1; }
	}
	if(BugOn[playerid] > 1)
	{
		BugInfo[playerid][BugX] = -99999.0;
		BugInfo[playerid][BugY] = -99999.0;
		BugInfo[playerid][BugZ] = -99999.0;
		BugOn[playerid] = 0;
	}
}
Heres it...
Reply
#4

Do you use 0admin admin system?
Reply
#5

I use GF admin system...idk whatsthatname of admin system...I dont think its with the admin system because if you exit the game via pause menu the server even crash :/
Reply
#6

Remove the admin fs from the config and see how it works.
Reply
#7

I dont use admin FS...Its in the gamemode...The problem isnt in the admin script...i know this 100%
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)