Crash at Spawn
#1

Hello everyone ..

Here's the problem: In Local mode (127.0.0.1), I have not seen bug, I do not crash at my spawn, everything is normal.

But with accommodation, SERVER FFS, people crash after some time. Do not worry it's not a problem of timer etc. ..
We had a player I was banished because he Crash everyone. After his banishment no crash. And then I guess one of the new Crash game made everyone. I do not know who it is.

Here are my resolutions: I try to change the system crash, I remove the Public 'SetPlayerSpawn' and I put it as a command, or resume. But this solution there, do not work, because now the players to crash their Spawn.
I looked Public OnPlayerSpawn, nothing to a problem in Spawn.

I wonder if this is not the bots are the problem. Alternatively, the IP addresses that unsuitable SERVER FFS.

I demand a solution for experienced users who can stop the crash of my players in the shortest time. Thank you.
Reply
#2

This is a bit of a stab in the dark. Do you use the streamer plugin with y_hooks? I had this problem it would work fine on windoze but on linux it would crash as soon as the streamer was used ie, objects streaming or entering checkpoints.

If you do not use these together your best bet of getting help would be by posting code for people to look at.
Reply
#3

Here is my OnPlayerDisconnect:

Код:
if(reason == 0)
	{
		textreason = "Crash";
		strmid(PlayerInfo[playerid][pWhyLeft], "Crashed", 0, strlen("Crashed"), 255);
		format(string2, sizeof(string2),"%s a quittй le serveur (%s)",plname, textreason);
   		ProxDetector(30.0, playerid, string2,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
   		PlayerInfo[playerid][pCrashed] = 1;
   		UpdatePlayerPosition(playerid);
   		SaveGuns(playerid);
	}
And then my OnPlayerSpawn:

Код:
public OnPlayerSpawn(playerid)
{
    if(IsPlayerNPC(playerid))
	{
	    new npcname[MAX_PLAYER_NAME];
		GetPlayerName(playerid, npcname, sizeof(npcname));
		RequestNPCLoad(playerid,npcname);
		return 1;
	}
	PlayerInfo[playerid][SpawnAngle] = 0.0;
    KillTimer(PlayerInfo[playerid][SpawnTimer])
    MontrerCamera[playerid] = 0;
    ScriptMoneyUpdated[playerid] = 1;
    SetRealMoney(playerid, ScriptMoney[playerid]);
	InitLockDoors(playerid);
	STDPlayer[playerid] = 0;
 	gTeam[playerid] = PlayerInfo[playerid][pTeam]; //Modifie le Genre du joueur
 	TextDrawHideForPlayer(playerid, TextdrawBarHaut);
 	TextDrawHideForPlayer(playerid, TextdrawBarBas);
	TextDrawHideForPlayer(playerid, TextdrawBienvenue);
	if (gTeam[playerid] == 4)
	{
		gTeam[playerid] = 3;
	}
	if(gPlayerLogged[playerid] == 0)
	{
    	SendClientMessage(playerid, COLOR_LIGHTRED, "Le serveur recquiиre une identification. Vous кtes Kick automatiquement");
        Kick(playerid);
 	}
	TextDrawHideForPlayer(playerid, Textdraw40[playerid]);
	if(gTeam[playerid] == 11 && PlayerInfo[playerid][pLeader] < 1)
	{
	    MedicBill[playerid] = 0;
	    new rand = random(sizeof(CIV));
		SendClientMessage(playerid, COLOR_LIGHTRED, "Vous n'кtes plus un leader approuvй, vous кtes maintenant un civil");
		PlayerInfo[playerid][pTeam] = 3;
		gTeam[playerid] = 3;
		SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
		PlayerInfo[playerid][pModel] = PlayerInfo[playerid][pChar];
		SpawnPlayer(playerid);
	}
	if(gTeam[playerid] == 5)
	{
	    if(PlayerInfo[playerid][pMember] < 1)
	    {
	        MedicBill[playerid] = 0;
	        new rand = random(sizeof(CIV));
			SendClientMessage(playerid, COLOR_LIGHTRED, "Vous n'кtes pas un membre de la famille, vous кtes maintenant un civil");
			PlayerInfo[playerid][pTeam] = 3;
			gTeam[playerid] = 3;
            SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
   			PlayerInfo[playerid][pModel] = PlayerInfo[playerid][pChar];
			SpawnPlayer(playerid);
		}
	}
	if(gTeam[playerid] == 10)
	{
	    if(PlayerInfo[playerid][pMember] != 8)
	    {
	        MedicBill[playerid] = 0;
	        new rand = random(sizeof(CIV));
			SendClientMessage(playerid, COLOR_LIGHTRED, "Vous n'кtes pas un membre de l'agence, vous кtes maintenant un civil");
			PlayerInfo[playerid][pTeam] = 3;
			gTeam[playerid] = 3;
            SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
   			PlayerInfo[playerid][pModel] = PlayerInfo[playerid][pChar];
			SpawnPlayer(playerid);
		}
	}
	if(gTeam[playerid] == 2 && PlayerInfo[playerid][pMember] > 3)
	{
	    MedicBill[playerid] = 0;
		new rand = random(sizeof(CIV));
		SendClientMessage(playerid, COLOR_LIGHTRED, "Vous n'avez pas membre du F.B.I, Garde nationale, vous кtes maintenant un civil");
		PlayerInfo[playerid][pTeam] = 3;
		gTeam[playerid] = 3;
		SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
		PlayerInfo[playerid][pModel] = PlayerInfo[playerid][pChar];
		SpawnPlayer(playerid);
	}
	if(PlayerInfo[playerid][pChar] > 0) { SetPlayerSkin(playerid, PlayerInfo[playerid][pChar]); }
	else { SetPlayerSkin(playerid, 230); }
	SetPlayerWeapons(playerid);
	SetPlayerSpawn(playerid);
	SetPlayerToTeamColor(playerid);
	PlayerFixRadio(playerid);
	IsCopBanned(playerid);
	for(new i = 0; i < sizeof(Turfs); i++)
	{
	    GangZoneShowForPlayer(playerid, i, TurfInfo[i][zColor]);
	    GangZoneShowForPlayer(playerid, TerritoireVagos, 0xFBFF59AA);
	    GangZoneShowForPlayer(playerid, TerritoireSurenos, 0x95FFF4AA);
	    GangZoneShowForPlayer(playerid, TerritoireBallas, 0xFF7DFFAA);
	    GangZoneShowForPlayer(playerid, TerritoireGroove, 0x46FF50AA);
        return 1;
	}
	return 1;
}
And finally my SetPlayerSpawn Crash:

Код:
if(PlayerInfo[playerid][pCrashed] == 1)
			{
			    new string[500];
       			new plname[MAX_PLAYER_NAME];
		        GetPlayerName(playerid, plname, sizeof(plname));
      			SetPlayerVirtualWorld(playerid,PlayerInfo[playerid][pVirWorld]);
	        	SafeSetPlayerInterior(playerid,PlayerInfo[playerid][pInt]);
	    		SafeSetPlayerPos(playerid, PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z] + 1);
				format(string, sizeof(string),"%s est entrй en ville (Du Crash)",plname);
   				ProxDetector(50.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
   				SetPlayerToTeamColor(playerid);
                SetPlayerWeapons(playerid);
				return 1;
			}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)