19.07.2014, 20:53
First of all, I would like to say that i have already posted this problem on the forums and nobody helped me fully ![Sad](images/smilies/sad.gif)
My Linux server crashes when killing anyone anyway. however on windows server the server doesn't crash, its natrually just spawnning the player in the hospital. I tried the crashdetect plugin, i tried .so extentions, i tried update script and includes, i tried reading the samp wiki and everything that came to my mind. I'm having a problem on linux server which caused by unknown source which i cant even figure out the crash code because it never output to anywhere. I debugged for whole day the script.
This problem doesn't related to windows, because on my dedicated server it doesn't crash.
I'll give some codes which might be related to the crash and i hope someone would figure out the problem, because I couldn't figure it out..
Those are the plugins:
Filterscripts are:
Forgodsake i'm looking all day into this problem, please help me
![Sad](images/smilies/sad.gif)
My Linux server crashes when killing anyone anyway. however on windows server the server doesn't crash, its natrually just spawnning the player in the hospital. I tried the crashdetect plugin, i tried .so extentions, i tried update script and includes, i tried reading the samp wiki and everything that came to my mind. I'm having a problem on linux server which caused by unknown source which i cant even figure out the crash code because it never output to anywhere. I debugged for whole day the script.
This problem doesn't related to windows, because on my dedicated server it doesn't crash.
I'll give some codes which might be related to the crash and i hope someone would figure out the problem, because I couldn't figure it out..
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(IsPlayerLoggedIn(playerid))
{
if(Drag[playerid])
{
new playerb;
Drag[playerid] = -1;
Dragged[playerb] = -1;
}
Dragged[playerid] = -1;
Inenforcer[playerid] = 0;
KillTimer(timer4);
KillTimer(timer5);
if(LicenseTest[playerid])
{
DisablePlayerCheckpoint(playerid);
LicenseTest[playerid] = 0;
DrivingStep[playerid] = 0;
SetVehicleToRespawn(GetPlayerVehicleID(playerid));
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You died in-test, therefore your test has been canceled.");
}
if(FedexJob[playerid])
{
DisablePlayerCheckpoint(playerid);
FedexJob[playerid] = 0;
FedexStep[playerid] = 0;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You died in-work, therefore your job canceled.");
}
if(DayNoDrops == 1)
{
for(new i=0; i<13; i++)
{
GetPlayerWeaponData(playerid, i, DNDW[i][0], DNDW[i][1]);
}
GunsBeingRemoved[playerid] = 1;
ResetPlayerWeapons(playerid);
}
if(Planted[playerid] == 1)
{
DestroyObject(C4[playerid]);
Bomb[playerid] = 0;
Planted[playerid] = 0;
}
Pspawned[playerid] = 0;
if(BankRobber[playerid])
{
new string[128];
new Rob = BankRobber[playerid]-1;
DisablePlayerCheckpoint(playerid);
BankRobbersCount --;
format(BankRobbers[Rob], MAX_PLAYER_NAME, "");
DeliverMoney[playerid] = 0;
//
foreach(Player, i)
{
if(BankRobber[i] || PlayerInfo[i][pFac] == 1)
{
if(Rob == 0) TextDrawHideForPlayer(i, Textdraw1);
else if(Rob == 1) TextDrawHideForPlayer(i, Textdraw2);
else if(Rob == 2) TextDrawHideForPlayer(i, Textdraw3);
else if(Rob == 3) TextDrawHideForPlayer(i, Textdraw4);
else if(Rob == 4) TextDrawHideForPlayer(i, Textdraw5);
}
}
format(string, sizeof(string), "** %s has been hospitalized and has failed the robbery. **", RPN(playerid));
SendRobberyMessage(COLOR_LIGHTRED, string);
SendCopMessage(COLOR_LIGHTRED, string);
BankRobber[playerid] = 0;
PlayerInfo[playerid][pBlindfold] = 0;
if(BankRobbersCount == 0)
{
TextDrawHideForAll(Textdraw0);
TextDrawHideForAll(Textdraw1);
TextDrawHideForAll(Textdraw2);
TextDrawHideForAll(Textdraw3);
TextDrawHideForAll(Textdraw4);
TextDrawHideForAll(Textdraw5);
BankRobbery = 0;
RobberyStarted = 0;
format(string, sizeof(string), "** The bank robbery has ended, $%d were stolen and $%d were saved. **", TotalStolen*10000, (TotalRobbers*10000-(TotalStolen*10000)));
SendClientMessageToAll(COLOR_YELLOW, string);
TotalRobbers = 0;
new copsonline;
foreach(Player, i)
{
if(IsACop(i)) copsonline++;
}
foreach(Player, i)
{
if(IsACop(i))
{
new Saved = (TotalRobbers*10000-(TotalStolen*10000));
GiveDodMoney(i, Saved/copsonline);
format(string, sizeof(string), "** You have received your cut from the saved money. ($%d)", Saved/copsonline);
SendClientMessage(i, COLOR_LIME, string);
}
}
}
}
DeletePVar(playerid, "SpeedRadar");
if(WearingMask[playerid] == 1)
{
WearingMask[playerid] = 0;
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
ShowPlayerNameTagForPlayer(i, playerid, 1);
}
}
}
if(Event[playerid])
{
new string[128];
format(string, sizeof(string), "OnEventDeath: %s has killed %s using %s.", RPN(killerid), RPN(playerid), RWN(reason));
Log("Logs/deaths.log", string);
foreach(Player, i)
{
if(Event[i]) SendClientMessage(i, COLOR_REPORT, string);
}
Event[playerid] = 0;
eventdeath[playerid] = 1;
}
if(Duel[playerid])
{
Duel[playerid] = 0;
Duel[killerid] = 0;
DuelOn = 0;
dueldeath[playerid] = 1;
dueldeath[killerid] = 0;
SetPlayerPos(killerid, eX, eY, eZ);
SetPlayerInterior(killerid, PlayerInfo[killerid][pInt]);
SetPlayerVirtualWorld(killerid, PlayerInfo[killerid][pVW]);
PlayerInfo[killerid][pHospital] = 0;
SetPlayerHealth(killerid, eHP);
SetPlayerArmour(killerid, eARMOR);
SendClientMessage(killerid, COLOR_LIGHTRED, "*** You won the duel, nice job. ***");
GunsBeingRemoved[killerid] = 1;
ResetPlayerWeapons(killerid);
GunsBeingRemoved[killerid] = 1;
for(new w = 0; w < 13; w++)
{
GiveDodWeapon(killerid, PlayerInfo[killerid][pWeapon][w], PlayerInfo[killerid][pWeaponAmmo][w]);
}
}
if(PlayerPaintballing[playerid] == 1)
{
new string[128];
for (new i = 0; i < 13; i++)
{
GetPlayerWeaponData(playerid, i, pbGuns[i][0], pbGuns[i][1]);
}
format(string, sizeof(string), "PaintballDeathLog: %s has killed %s using %s.", RPN(killerid), RPN(playerid), RWN(reason));
Log("Logs/deaths.log", string);
new Float:myhp;
GetPlayerHealth(killerid, myhp);
SetPlayerHealth(killerid, myhp+30);
if(myhp == 100)
{
SetPlayerHealth(killerid, 100);
}
foreach(Player, i)
{
if(PlayerPaintballing[i]) SendClientMessage(i, COLOR_REPORT, string);
}
PlayerPaintballing[playerid] = 1;
}
else
{
PlayerInfo[playerid][pHospital] = 1;
PlayerInfo[playerid][pArmor] = 0;
if(IsPlayerLoggedIn(killerid))
{
new string[128];
format(string, sizeof(string), "DeathLog %s has killed %s using %s.", RPN(killerid), RPN(playerid), RWN(reason));
SendAdminMessage(COLOR_DARKRED, 1, string);
Log("Logs/deaths.log", string);
PlayerInfo[playerid][pDeath] ++;
PlayerInfo[killerid][pKill] ++;
if(Hitman[killerid] == playerid)
{
format(string, sizeof(string), " You have been critically injured by a hitman and lost $%d, the contrat on your head was cleared.", PlayerInfo[playerid][pContract]/2);
SendClientMessage(playerid, COLOR_YELLOW, string);
format(string, sizeof(string), "HitmanWarn: %s has fulfilled the contract on %s's head and collected $%d.", RPN(killerid), RPN(playerid), PlayerInfo[playerid][pContract]/2);
SendHitmanMessage(COLOR_YELLOW, string);
GiveDodMoney(playerid, -PlayerInfo[playerid][pContract]/2);
GiveDodMoney(killerid, PlayerInfo[playerid][pContract]/2);
PlayerInfo[playerid][pContract] = 0;
format(PlayerInfo[playerid][pContract], 32, "");
Hitman[killerid] = -1;
PlayerInfo[killerid][pCSuccess] ++;
}
if(Hitman[playerid] == killerid)
{
format(string, sizeof(string), " You have critically injured a hitman and collected $%d, the contrat on your head was cleared.", PlayerInfo[killerid][pContract]);
SendClientMessage(killerid, COLOR_YELLOW, string);
format(string, sizeof(string), "HitmanWarn: %s has failed the contract on %s's head and lost $%d.", RPN(playerid), RPN(killerid), PlayerInfo[killerid][pContract]);
SendHitmanMessage(COLOR_YELLOW, string);
GiveDodMoney(playerid, -PlayerInfo[killerid][pContract]);
GiveDodMoney(killerid, PlayerInfo[killerid][pContract]);
PlayerInfo[killerid][pContract] = 0;
format(PlayerInfo[killerid][pContract], 32, "");
Hitman[playerid] = -1;
PlayerInfo[playerid][pCFail] ++;
}
}
}
}
return 1;
}
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerVirtualWorld(playerid, 973942);
if(IsPlayerNPC(playerid))
{
SetPlayerVirtualWorld(playerid, 0);
SpawnPlayer(playerid);
return 1;
}
if(!PlayerInfo[playerid][pLoggedIn])
{
InterpolateCameraPos(playerid, 2007.9889,-1477.0032,117.9582, 500.1391,-1864.9094,73.1234, 30000, CAMERA_MOVE);
InterpolateCameraLookAt(playerid, 1897.1287,-1419.8665,19.9680, 528.9075,-1814.1616,10.9022, 30000, CAMERA_MOVE);
SetSpawnInfo(playerid, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0);
TogglePlayerSpectating(playerid, true);
SetTimerEx("login_dialog", 100, 0, "i", playerid);
if(!fexist(UserDB(playerid)))
{
TogglePlayerControllable(playerid,0);
SetPlayerColor(playerid,TEAM_HIT_COLOR);
ShowPlayerDialog(playerid,DIALOG_QUIZ1,DIALOG_STYLE_LIST,"What is the SA-MP roleplaying definition of 'IC' & 'OOC'?", "Internet Connection\nIn Character & Out Of Character\nIntegrated Circuit\n", "Select", "LeaveGame");
}
else
{
SSSShowDialog(playerid, 2);
}
return 1;
}
else
{
SetPlayerPos(playerid,1514.7783,-1700.2913,-10.0);
InterpolateCameraPos(playerid, 2007.9889,-1477.0032,117.9582, 500.1391,-1864.9094,73.1234, 30000, CAMERA_MOVE);
InterpolateCameraLookAt(playerid, 1897.1287,-1419.8665,19.9680, 528.9075,-1814.1616,10.9022, 30000, CAMERA_MOVE);
SetSpawnInfo(playerid, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
SetTimerEx("login_dialog", 100, 0, "i", playerid);
SpawnPlayer(playerid);
}
return 1;
}
pawn Код:
public OnPlayerSpawn(playerid)
{
//TogglePlayerSpectating(playerid, false);
PlayerInfo[playerid][pDynamicFac] = PlayerInfo[playerid][pFac];
StopAudioStreamForPlayer(playerid);
HideArea(playerid);
TextDrawShowForPlayer(playerid, Website);
TextDrawShowForPlayer(playerid, Forum);
TextDrawShowForPlayer(playerid, TimeTD);
TextDrawShowForPlayer(playerid, Date);
TogglePlayerSpectating(playerid, false);
if(!PlayerInfo[playerid][pLoggedIn] && !IsPlayerNPC(playerid))
{
new file[64];
if(IsPlayerNPC(playerid)) return 1;
SetPlayerPos(playerid, 1305.5662841797,-1543.8950195313,122.20141601563);
SetPlayerCameraPos(playerid, 1460.0, -1324.0, 287.2);
SetPlayerCameraLookAt(playerid, 1374.5, -1291.1, 239.0);
SetSpawnInfo(playerid, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
format(file, sizeof(file), "UserDB/%s.ini", RPNU(playerid));
if(!dini_Exists(file))
{
SSSShowDialog(playerid, 1);
return 1;
}
else
{
SSSShowDialog(playerid, 2);
}
return 1;
}
ResetPlayerWeapons(playerid);
if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
{
new npcname[MAX_PLAYER_NAME];
GetPlayerName(playerid, npcname, sizeof(npcname)); //Getting the NPC's name.
if(!strcmp(npcname, "GOD", true)) //Checking if the NPC's name is GOD
{ //Putting the NPC into the vehicle we created for it.
return 0;
}
return 1;
}
if(PlayerInfo[playerid][pLoggedIn] && PlayerInfo[playerid][pSpawn])
{
FalseBan[playerid] = 0;
SetTimerEx("FalseBanFix", 6000, false, "i", playerid);
SpawnChar(playerid);
}
//SpawnChar(playerid);
return 1;
}
pawn Код:
irc.so streamer.so sscanf.so FileFunctions.so gvar.so Whirlpool.so nativechecker.so crashdetect.so
pawn Код:
opr livebarcar carwash buttons armedbody BugReport
![Sad](images/smilies/sad.gif)