OnPlayerDisconnect Problem
#1

Hi GUyz i got problem in my server when Player Leave or timeout Most of the Time Server Lagg badly ,no player in Server can move due to that lagg.No cmd work due to that lagg when Player leave the Server then it work Fine
and Due to that Lagg half of the Players in Server Leave I am using LuxAdmin 1.6 . LuxAdmin also Not Saving Player Money. when player dead player all money Gone to 0
What i can do?
I Hope You GUyz help Again thanks
Reply
#2

Can you show us your OnPlayerDisconnect?
Reply
#3

it work fine Without LuxAdmin but WHen i add Luxadmin Fs most of time Server lagg badly on player disconnect or timeout then half of player leave due to that what i can do?
this is Code
Код:
public OnPlayerDisconnect(playerid, reason)
{
 	 Delete3DTextLabel(label[playerid]);
 	 RoadBlockDeployed[playerid] = 0;
	 DestroyObject(PlayerRB[playerid]);
 	if ( ShipEnabled[playerid] )
		DestroyObject( ShipObject[playerid] );

	if ( FlareEnabled[playerid] )
		DestroyObject( FlareObject[playerid] );

	if ( SharkEnabled[playerid] )
		DestroyObject( SharkObject[playerid] );

	if ( FogEnabled[playerid] )
		DestroyObject( FogObject[playerid] );

	if ( TurtleEnabled[playerid] )
		DestroyObject( TurtleObject[playerid] );

	if (BushEnabled[playerid] )
	    DestroyObject( BushObject[playerid] );
     return 1;
}
Reply
#4

That can't be all your OnPlayerDisconnect() code you have to have a FS or something.
Reply
#5

this is My GM Code OnPlayerDisconnect i am Using 1 Filterscript that is LuxAdmin 1.6
This is LuxAdmin OnPlayerDisconnect code
Код:
//==============================================================================
//-------------------------------------------------
// Player Disconnect
//-------------------------------------------------
//==============================================================================
public OnPlayerDisconnect(playerid, reason)
{
	new PlayerName[MAX_PLAYER_NAME], str[128];
	GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
	
	if(AccInfo[playerid][LoggedIn] == 1)
	SavePlayerStats(playerid);

	if(udb_Exists(PlayerName2(playerid))) dUserSetINT(PlayerName2(playerid)).("Loggedin",0);
  	AccInfo[playerid][LoggedIn] = 0;
	AccInfo[playerid][Level] 	= 0;
	AccInfo[playerid][pVip] 	= 0;
	AccInfo[playerid][Jailed] 	= 0;
	AccInfo[playerid][pCaged]   = 0;
	AccInfo[playerid][MaxAdv]   = 0;
	AccInfo[playerid][Frozen] 	= 0;
	AccInfo[playerid][Hide]   	= 0;
	AccInfo[playerid][OnDuty]  	= 0;
	AccInfo[playerid][pInvis]  	= 0;
	AccInfo[playerid][pGps]		= -1;
	
	#if EnableTwoRcon == true
	AccInfo[playerid][MaxRcon] 	= 0;
	#endif

	if(AccInfo[playerid][Jailed] == 1)
	KillTimer( JailTimer[playerid] );
	
	if(AccInfo[playerid][Frozen] == 1)
	KillTimer( FreezeTimer[playerid] );
	
	if(ServerInfo[Locked] == 1)
	KillTimer( LockKickTimer[playerid] );

	if(AccInfo[playerid][pCar] != -1) EraseVeh(AccInfo[playerid][pCar]);
//------------------------------------------------------------------------------
// Spectating
//------------------------------------------------------------------------------
	for(new x=0; x<MAX_PLAYERS; x++)
    if(GetPlayerState(x) == PLAYER_STATE_SPECTATING && AccInfo[x][SpecID] == playerid)
	AdvanceSpectate(x);
//------------------------------------------------------------------------------
	if(ServerInfo[ConnectMessages] == 1)
	{
	switch (reason)
	{
	case 0:
	format(str, sizeof(str), "* Player %s (Id:%d) has left the Server (Timeout)", PlayerName, playerid);
	case 1:
	format(str, sizeof(str), "* Player %s (Id:%d) has left the Server (Leaving)", PlayerName, playerid);
	case 2:
	format(str, sizeof(str), "* Player %s (Id:%d) has left the Server (Kicked/Banned)", PlayerName, playerid);
	}
	SendClientMessageToAll(grey, str);
    }
    #if EnableCamHack == true
   	if(AccInfo[playerid][InCamMod] == 1)
	{
	    KillTimer(KeyTimer[playerid]);
		AccInfo[playerid][InCamMod] = 0;
	}
	#endif
 	return 1;
}
Reply
#6

So it's obviously your FS causing a problem because that GM code shouldn't crash your server. I'm thinking your missing a folder or something check your file system.
Reply
#7

I have all the Files in My ScriptFiles Folder
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)