SA-MP Forums Archive
Server Crash When Player Joins? (No error logs) - 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)
+--- Thread: Server Crash When Player Joins? (No error logs) (/showthread.php?tid=309474)



Server Crash When Player Joins? (No error logs) - prisonliferp - 07.01.2012

Okay so, today I bought an 40 Slots SA:MP Server at "VOLT-HOST"

I updated it 0.3d R2, installed sscanf2 & Streamer plugins, moved my scriptfiles and so on over onto the server FTP.

But for some reason, whenever a player joins he can put his password in and choose between "Tutorial" & "Spawn"

-You press one of the dialog buttons and the server crashes.. -There is NO error outputs in the log or anything, it simply ends like this:

Код:
[13:31:35] |-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|
[13:31:35] Number of vehicle models: 4
[13:31:35] Incoming connection: 184.95.34.xxxxx
[13:32:35] Incoming connection: 196.221.171.xxxxx
[13:32:36] [join] Dwayne_Velli has joined the server (0:196.221.xxxxxx)
[13:32:54] [part] Dwayne_Velli has left the server (0:2)
[13:33:01] [join] Rasmus_Fischer has joined the server (0:87.60.xxxxxx)
-Like that, after "Rasmus_Fischer" Presses on "Spawn" He get's kicked.

I allready tried this on my own Windows server and there is NOTHING wrong with it.. Volt-Host is LINUX.


Re: Server Crash When Player Joins? (No error logs) - Georgelopez1 - 07.01.2012

Volt-Host is on a Linux operating system so you need to make sure you are using the Linux version of your plugins. Also remember that Linux is case sensitive.


Re: Server Crash When Player Joins? (No error logs) - Steven82 - 07.01.2012

Quote:
Originally Posted by Georgelopez1
Посмотреть сообщение
Also remember then Linux is case sensitive.
This is the most common pain in the ass error..


Re: Server Crash When Player Joins? (No error logs) - Georgelopez1 - 07.01.2012

Yeah, I just had to tell him because he may be moving from a Windows server.


Re: Server Crash When Player Joins? (No error logs) - prisonliferp - 07.01.2012

Everything is working as it should, it loads the plugins just fine, filterscripts too, EVERYTHING works, the only problem is that the server crashes when players joins and should spawn..

When they click on "Spawn" The server crash?
-Could it maybe be caused by Loose Identitation error in mappings?
Or anything similar?

I got NO clue at all, I tried everything.. Switched plugins, checked server.cfg atleast 30 Times..


Re: Server Crash When Player Joins? (No error logs) - Steven82 - 07.01.2012

Whats in your OnPlayerSpawn and OnPlayerRequestSpawn code?


Re: Server Crash When Player Joins? (No error logs) - Scenario - 07.01.2012

Are you using MySQL in your script at all?


Re: Server Crash When Player Joins? (No error logs) - prisonliferp - 07.01.2012

No MySQL Is used, at all.

OnPlayerSpawn code:

Код:
public OnPlayerSpawn(playerid)
{
	if(IsPlayerNPC(playerid))
  	{
    	new npcname[MAX_PLAYER_NAME];
    	GetPlayerName(playerid, npcname, sizeof(npcname));
    	if(!strcmp(npcname, "intro", true))
    	{
      		PutPlayerInVehicle(playerid, introplane, 0);
      		SetPlayerArmour(playerid, 0);
      		SetPlayerColor(playerid, COLOR_WHITE);
    	}
		return 1;
	}
	/*if(PlayerInfo[playerid][pJailed] == 1) //The yellow screen bug.
	{
        SetPlayerSpawn(playerid);
		return 1;
	}*/
	if(PlayerInfo[playerid][pBackPack] == 0)
	{
		PlayerInfo[playerid][pSlots] = 20;
	}
	if(PlayerInfo[playerid][pBackPack] == 1)
	{
		PlayerInfo[playerid][pSlots] = 50;
		SetPlayerAttachedObject(playerid, 1, 363, 1, 0.300000, -0.14,0.2, 0.000000, 90, 359.5022,1,1,1);
	}
	if(PlayerInfo[playerid][pBackPack] == 2)
	{
		PlayerInfo[playerid][pSlots] = 100;
		SetPlayerAttachedObject(playerid, 1, 363, 1, 0.300000, -0.14,0.2, 0.000000, 90, 359.5022,1,1,1);
	}
	if(PlayerInfo[playerid][pBackPack] == 3)
	{
		PlayerInfo[playerid][pSlots] = 150;
		SetPlayerAttachedObject(playerid, 1, 363, 1, 0.300000, -0.14,0.2, 0.000000, 90, 359.5022,1,1,1);
	}
	freeze(playerid);
	onduty[playerid] = 0;
	Delete3DTextLabel(Text3D:label[playerid]);
    hungertimer[playerid] = SetTimerEx("hunger", 1200000, true, "i", playerid);
    thirsttimer[playerid] = SetTimerEx("thirsty", 1200000, true, "i", playerid);
	if(PlayerInfo[playerid][pSurvivors] == 1)
	{
		if(FirstSpawn[playerid] == 1)
		{
			SendClientMessage(playerid, COLOR_WHITE, "You'll get kicked so your account is saved!");
			PlayerInfo[playerid][pPos_x] = 210.1676;
			PlayerInfo[playerid][pPos_y] = -225.8301;
			PlayerInfo[playerid][pPos_z] = 1.7786;
			FirstSpawn[playerid] = 0;
			PlayerInfo[playerid][pGun] = 0;
			PlayerInfo[playerid][pGun2] = 0;
			PlayerInfo[playerid][pGun3] = 0;
			PlayerInfo[playerid][pGun4] = 0;
			PlayerInfo[playerid][pGun5] = 0;
			GivePlayerWeapon(playerid, 0, 1);
            Hunger[playerid] = CreateProgressBar(549.00, 60.00, 57.50, 3.20, -16776961, 100.0);
		    Thirst[playerid] = CreateProgressBar(549.00, 51.00, 57.50, 3.20, -1378294017, 100.0);
			ShowProgressBarForPlayer(playerid, Hunger[playerid]);
			ShowProgressBarForPlayer(playerid, Thirst[playerid]);
			Hungry[playerid] = 0;
			Thirsty[playerid] = 0;
			PlayerInfo[playerid][pFish] = 0;
			PlayerInfo[playerid][pWater] = 0;
			PlayerInfo[playerid][pMatches] = 0;
			PlayerInfo[playerid][pFishDone] = 0;
			PlayerInfo[playerid][pMute] = 0;
			PlayerInfo[playerid][pRmute] = 0;
			PlayerInfo[playerid][pJailed] = 0;
			PlayerInfo[playerid][pJailTime] = 0;
			PlayerInfo[playerid][pRespect] = 0;
			PlayerInfo[playerid][pCoOwner] = 0;
			PlayerInfo[playerid][pVip] = 0;
			PlayerInfo[playerid][pWalkieTalkie] = 0;
			PlayerInfo[playerid][pWalkieBroken] = 0;
			PlayerInfo[playerid][pChoosenTeam] = 0;
			PlayerInfo[playerid][pRelationShip] = 0;
			PlayerInfo[playerid][pFishingNet] = 0;
			PlayerInfo[playerid][pInt] = 0;
			PlayerInfo[playerid][pWaterBottle] = 0;
			PlayerInfo[playerid][pCheckedBox] = 0;
			PlayerInfo[playerid][pBackPackType] = 0;
			PlayerInfo[playerid][pFishingNet] = 0;
			PlayerInfo[playerid][pFishingRod] = 0;
			PlayerInfo[playerid][pSlots] = 20;
			SendClientMessage(playerid, COLOR_GREEN, "I see you are new here, Use (/n)ewbie to ask any questions");
  		}
  		else if(FirstSpawn[playerid] == 0)
  		{
			new gun = PlayerInfo[playerid][pGun];
			new gun2 = PlayerInfo[playerid][pGun2];
			new gun3 = PlayerInfo[playerid][pGun3];
			new gun4 = PlayerInfo[playerid][pGun4];
			new gun5 = PlayerInfo[playerid][pGun5];
			SetPlayerPos(playerid, PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z] + 1);
			SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
		    Hunger[playerid] = CreateProgressBar(549.00, 60.00, 57.50, 3.20, -16776961, 100.0);
		    Thirst[playerid] = CreateProgressBar(549.00, 51.00, 57.50, 3.20, -1378294017, 100.0);
			ShowProgressBarForPlayer(playerid, Hunger[playerid]);
			ShowProgressBarForPlayer(playerid, Thirst[playerid]);
			Hungry[playerid] = 0;
			Thirsty[playerid] = 0;
			SetPlayerColor(playerid, COLOR_WHITE);
			GivePlayerWeapon(playerid, gun, 1);
			GivePlayerWeapon(playerid, gun2, 500);
			GivePlayerWeapon(playerid, gun3, 500);
			GivePlayerWeapon(playerid, gun4, 500);
			GivePlayerWeapon(playerid, gun5, 500);
			SetPlayerInterior(playerid, PlayerInfo[playerid][pInt]);
			SendClientMessage(playerid, COLOR_WHITE, "Welcome back to Fallout Roleplay! Enjoy your stay!");
   			return 1;
		}
	 	if(PlayerInfo[playerid][pVip] > 0)
		{
			if(PlayerInfo[playerid][pSurvivors] == 1)
			{
				new vtext[20];
				if(PlayerInfo[playerid][pVip] == 1) { vtext = "Bronze Vip"; }
				else if(PlayerInfo[playerid][pVip] == 2) { vtext = "Silver Vip"; }
				else if(PlayerInfo[playerid][pVip] == 3) { vtext = "Gold Vip"; }
				new string[128];
			    new name[MAX_PLAYER_NAME];
				GetPlayerName(playerid, name, sizeof(name));
				format(string, sizeof(string),"Welcome back %s! You are a %s! Thank you for donating. You are spawning with a knife!",name,vtext);
				SendClientMessage(playerid, COLOR_WHITE,string);
				new gun = PlayerInfo[playerid][pGun];
    			PlayerInfo[playerid][pGun] = 4;
				GivePlayerWeapon(playerid, gun, 1);
				SetPlayerPos(playerid, PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z] + 1);
				SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
			    Hunger[playerid] = CreateProgressBar(549.00, 60.00, 57.50, 3.20, -16776961, 100.0);
			    Thirst[playerid] = CreateProgressBar(549.00, 51.00, 57.50, 3.20, -1378294017, 100.0);
				ShowProgressBarForPlayer(playerid, Hunger[playerid]);
				ShowProgressBarForPlayer(playerid, Thirst[playerid]);
				Hungry[playerid] = 0;
				Thirsty[playerid] = 0;
				SetPlayerColor(playerid, COLOR_WHITE);
				SetPlayerInterior(playerid, PlayerInfo[playerid][pInt]);
				return 1;
			}
            if(PlayerInfo[playerid][pVip] > 1)
            {
			 	if(PlayerInfo[playerid][pOthers] == 1)
				{
	            	new vtext[20];
					if(PlayerInfo[playerid][pVip] == 1) { vtext = "Bronze Vip"; }
					else if(PlayerInfo[playerid][pVip] == 2) { vtext = "Silver Vip"; }
					else if(PlayerInfo[playerid][pVip] == 3) { vtext = "Gold Vip"; }
					new string[128];
				    new name[MAX_PLAYER_NAME];
					GetPlayerName(playerid, name, sizeof(name));
					format(string, sizeof(string),"Welcome back %s! You are a %s! Thank you for donating. You are spawning with a knife!",name,vtext);
					SendClientMessage(playerid, COLOR_WHITE,string);
					new gun = PlayerInfo[playerid][pGun];
	                PlayerInfo[playerid][pGun] = 4;
					GivePlayerWeapon(playerid, gun, 1);
					SetPlayerPos(playerid, PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z] + 1);
					SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
				    Hunger[playerid] = CreateProgressBar(549.00, 60.00, 57.50, 3.20, -16776961, 100.0);
				    Thirst[playerid] = CreateProgressBar(549.00, 51.00, 57.50, 3.20, -1378294017, 100.0);
					ShowProgressBarForPlayer(playerid, Hunger[playerid]);
					ShowProgressBarForPlayer(playerid, Thirst[playerid]);
					Hungry[playerid] = 0;
					Thirsty[playerid] = 0;
					SetPlayerColor(playerid, COLOR_WHITE);
					SetPlayerInterior(playerid, PlayerInfo[playerid][pInt]);
					return 1;
				}
			}
		}
	}
	if(PlayerInfo[playerid][pOthers] == 1)
	{
		if(FirstSpawn[playerid] == 1)
		{
			PlayerInfo[playerid][pPos_x] = 210.1676;
			PlayerInfo[playerid][pPos_y] = -225.8301;
			PlayerInfo[playerid][pPos_z] = 1.7786;
		    SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
		    FirstSpawn[playerid] = 0;
			PlayerInfo[playerid][pGun] = 0;
			Hunger[playerid] = CreateProgressBar(549.00, 60.00, 57.50, 3.20, -16776961, 100.0);
		    Thirst[playerid] = CreateProgressBar(549.00, 51.00, 57.50, 3.20, -1378294017, 100.0);
			ShowProgressBarForPlayer(playerid, Hunger[playerid]);
			ShowProgressBarForPlayer(playerid, Thirst[playerid]);
			Hungry[playerid] = 0;
			Thirsty[playerid] = 0;
			PlayerInfo[playerid][pGun] = 0;
			PlayerInfo[playerid][pWalkieTalkie] = 1;
			SendClientMessage(playerid, COLOR_WHITE, "You have a walkie talkie, Use (/w)alkietalkie to use it!");
			SetPlayerInterior(playerid, PlayerInfo[playerid][pInt]);
			GivePlayerWeapon(playerid, 0, 1);
			PlayerInfo[playerid][pFish] = 0;
			PlayerInfo[playerid][pWater] = 0;
			PlayerInfo[playerid][pMatches] = 0;
			PlayerInfo[playerid][pFishDone] = 0;
			PlayerInfo[playerid][pMute] = 0;
			PlayerInfo[playerid][pRmute] = 0;
			PlayerInfo[playerid][pJailed] = 0;
			PlayerInfo[playerid][pJailTime] = 0;
			PlayerInfo[playerid][pRespect] = 0;
			PlayerInfo[playerid][pCoOwner] = 0;
			PlayerInfo[playerid][pVip] = 0;
			PlayerInfo[playerid][pWalkieTalkie] = 0;
			PlayerInfo[playerid][pWalkieBroken] = 0;
			PlayerInfo[playerid][pChoosenTeam] = 0;
			PlayerInfo[playerid][pRelationShip] = 0;
			PlayerInfo[playerid][pFishingNet] = 0;
			PlayerInfo[playerid][pInt] = 0;
			PlayerInfo[playerid][pWaterBottle] = 0;
			PlayerInfo[playerid][pCheckedBox] = 0;
			PlayerInfo[playerid][pBackPackType] = 0;
			PlayerInfo[playerid][pFishingNet] = 0;
			PlayerInfo[playerid][pFishingRod] = 0;
			PlayerInfo[playerid][pGun] = 0;
			PlayerInfo[playerid][pGun2] = 0;
			PlayerInfo[playerid][pGun3] = 0;
			PlayerInfo[playerid][pGun4] = 0;
			PlayerInfo[playerid][pGun5] = 0;
			SendClientMessage(playerid, COLOR_GREEN, "I see you are new here, Use (/n)ewbie to ask any questions");
			PlayerInfo[playerid][pSlots] = 20;
		}
		else if(FirstSpawn[playerid] == 0)
		{
			new gun = PlayerInfo[playerid][pGun];
			new gun2 = PlayerInfo[playerid][pGun2];
			new gun3 = PlayerInfo[playerid][pGun3];
			new gun4 = PlayerInfo[playerid][pGun4];
			new gun5 = PlayerInfo[playerid][pGun5];
			SetPlayerPos(playerid, PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z] + 1);
			SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
		    Hunger[playerid] = CreateProgressBar(549.00, 60.00, 57.50, 3.20, -16776961, 100.0);
		    Thirst[playerid] = CreateProgressBar(549.00, 51.00, 57.50, 3.20, -1378294017, 100.0);
			ShowProgressBarForPlayer(playerid, Hunger[playerid]);
			ShowProgressBarForPlayer(playerid, Thirst[playerid]);
			Hungry[playerid] = 0;
			Thirsty[playerid] = 0;
			SetPlayerColor(playerid, COLOR_WHITE);
   			GivePlayerWeapon(playerid, gun, 1);
			GivePlayerWeapon(playerid, gun2, 500);
			GivePlayerWeapon(playerid, gun3, 500);
			GivePlayerWeapon(playerid, gun4, 500);
			GivePlayerWeapon(playerid, gun5, 500);
			SetPlayerInterior(playerid, PlayerInfo[playerid][pInt]);
			SendClientMessage(playerid, COLOR_WHITE, "Welcome back to Fallout Roleplay! Enjoy your stay!");
		}
	}
	return 1;
}



Re: Server Crash When Player Joins? (No error logs) - Georgelopez1 - 07.01.2012

Are you using any filterscripts that you didn't make?


Re: Server Crash When Player Joins? (No error logs) - prisonliferp - 07.01.2012

I am, but the server does the same thing if no filterscripts are being used.
-So that shouldn't be causing it.

Also keep in mind that it worked 100% With filterscripts and everything on Windows.