Server Crashes
#1

Hey , recently I'm getting these server crashes and I can't really understand what is causing them.

Here is the debug from my log.

pawn Код:
[19:47:57] [debug] Server crashed while executing rp.amx
[19:47:57] [debug] AMX backtrace:
[19:47:57] [debug] #0 00120b0c in PlayerUpdateListener (playerid=36) at E:\Multe\Servere SA-MP\Modern-RP\Modern-RP Main Server Files\gamemodes\rp.pwn:28062
[19:47:57] [debug] #1 0004dc8c in public CrashListener () at E:\Multe\Servere SA-MP\Modern-RP\Modern-RP Main Server Files\gamemodes\rp.pwn:6099
[19:47:57] [debug] System backtrace:
[19:47:57] [debug] #0 f6ae835b in _ZN10StackTraceC1EPv () from plugins/crashdetect.so
[19:47:57] [debug] #1 f6ae1389 in _ZN11crashdetect20PrintSystemBacktraceEPv () from plugins/crashdetect.so
[19:47:57] [debug] #2 f6ae38ed in _ZN11crashdetect11OnExceptionEPv () from plugins/crashdetect.so
[19:47:57] [debug] #3 f6ae7e68 in ?? () from plugins/crashdetect.so
[19:47:57] [debug] #4 f7707410 in ?? ()
[19:47:57] [debug] #5 080c9c47 in ?? () from /home/gsp_1327/93.119.26.226-7777/samp03svr
[19:47:57] [debug] #6 080cba55 in ?? () from /home/gsp_1327/93.119.26.226-7777/samp03svr
[19:47:57] [debug] #7 f6aea19f in amx_Exec () from plugins/crashdetect.so
[19:47:57] [debug] #8 f6ae3dab in _ZN11crashdetect9DoAmxExecEPii () from plugins/crashdetect.so
[19:47:57] [debug] #9 f6ae6457 in ?? () from plugins/crashdetect.so
[19:47:57] [debug] #10 080dc115 in ?? () from /home/gsp_1327/93.119.26.226-7777/samp03svr
[19:47:57] [debug] #11 080b5cfb in ?? () from /home/gsp_1327/93.119.26.226-7777/samp03svr
[19:47:57] [debug] #12 080b14d3 in ?? () from /home/gsp_1327/93.119.26.226-7777/samp03svr
[19:47:57] [debug] #13 f7426e46 in __libc_start_main () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
[19:47:57] [debug] #14 0804b521 in ?? () from /home/gsp_1327/93.119.26.226-7777/samp03svr
Those two line : One is "SetPlayerName" the other is "IfIsPlayerConnectedEx"
Reply
#2

Sorry for bumping.But no one has any ideas? I'll + rep of course.
Reply
#3

Really ? No one on these forums has the slightest idea ?
Reply
#4

"IfIsPlayerConnectedEx"

can you show us that line please, also show us the line above this line, and the line under this line.
Reply
#5

I think these will do.

pawn Код:
public CrashListener()
{

    for(new i = 0; i < MAX_PLAYERS; i ++)
    {

        if(IsPlayerConnected(i) && !IsPlayerNPC(i)) PlayerUpdateListener(i);
        if(IsPlayerConnectedEx(i))
        {

            if(IsPlayerInAnyVehicle(i) && !crash_detection_disabled[i])
            {

                new veh = GetPlayerVehicleID(i);
                new Float:hp;
                GetVehicleHealth(veh,hp);
                if(hp < crash_vhp[veh])
                {
Reply
#6

show me your function IsPlayerConnectedEx.
Reply
#7

pawn Код:
public IsPlayerConnectedEx(playerid)
{

    if(IsPlayerConnected(playerid) && character_chosen[playerid]) { return true; }
    return false;

}
Reply
#8

show me all of your CrashListener, you only posted half of it.
Reply
#9

The rest is about speed and things,but okay,I will show it.
pawn Код:
public CrashListener()
{

    for(new i = 0; i < MAX_PLAYERS; i ++)
    {

        if(IsPlayerConnected(i) && !IsPlayerNPC(i)) PlayerUpdateListener(i);
        if(IsPlayerConnectedEx(i))
        {

            if(IsPlayerInAnyVehicle(i) && !crash_detection_disabled[i])
            {

                new veh = GetPlayerVehicleID(i);
                new Float:hp;
                GetVehicleHealth(veh,hp);
                if(hp < crash_vhp[veh])
                {
                    new Float:difference;
                    difference = (crash_vhp[veh] - hp);
                    if(difference > 100)
                    {

                        new Float:speed_x, Float:speed_y, Float:speed_z;
                        GetVehicleVelocity(GetPlayerVehicleID(i),speed_x,speed_y,speed_z);
                        new Float:final_speed = floatsqroot(((speed_x*speed_x)+(speed_y*speed_y))+(speed_z*speed_z))*99.4166672; // 250.666667 = kmph  // 199,4166672 = mph
                        new speed = floatround(final_speed,floatround_round);
                        if(speed < player_vehicle_speed[i])
                        {
                            new Float:sdifference;
                            sdifference = (player_vehicle_speed[i] - speed);
                            if(sdifference > 20)
                            {

                                new drunk_gain = 4000;
                                if(seatbelt[i]) { drunk_gain = 3000; }
                                SetPlayerDrunkLevel(i,(GetPlayerDrunkLevel(i) + drunk_gain));
                                if(difference > 100)
                                {
                                    new Float:phploss;
                                    phploss = floatround((difference / 4));
                                    if(seatbelt[i]) { phploss = floatround(phploss / 2); if(phploss < 0) { phploss = 0; } }
                                    new Float:php;
                                    GetPlayerHealth(i,php);
                                    SetPlayerHealth(i,(php - phploss));
                                }
                                TextDrawShowForPlayer(i,crash_screen);
                                SetTimerEx("HideCrash",250,0,"i",i);

                            }

                        }

                    }

                }

            }
            if(!speedcamera_cooldown[i] && GetPlayerState(i) == PLAYER_STATE_DRIVER)
            {
                for(new a = 0; a < sizeof(speed_cameras); a ++)
                {

                    if(IsPlayerInRangeOfPoint(i,30.0,speed_cameras[a][0],speed_cameras[a][1],speed_cameras[a][2]))
                    {

                        if(player_vehicle_speed[i] >= 61)
                        {

                            if(!InCopCar(i) && !InAmbulance(i) && !IsAircraft(GetPlayerVehicleID(i)) && GetVehicleModel(GetPlayerVehicleID(i)) != 407)
                            {

                                new Float:X, Float:Y, Float:Z;
                                GetPlayerPos(i,X,Y,Z);
                                new name[MAX_PLAYER_NAME];
                                GetCharacterNameEx(i,name);
                                new str[256];
                                format(str,sizeof(str),"** FLASH ** Radarul a facut o poza asupra vehiculului lui %s",name);
                                SendServerEmote(str,X, Y, Z, 30.0, 0);
                                speedcamera_cooldown[i] = 60;
                                if(CharacterInfo[i][active_character[i]][cBank] >= 420) { CharacterInfo[i][active_character[i]][cBank] -= 420; FactionInfo[0][fBank] += 420; CharacterInfo[i][active_character[i]][cSpeedTicket] += 420; }
                                PlayerPlaySound(i,1132,0.0,0.0,0.0);
                                if(speed_camera_stats[a] == -1)
                                {

                                    X = speed_cameras[a][0];
                                    Y = speed_cameras[a][1];
                                    GetPosInFrontOfCoord(X, Y, speed_cameras[a][2], 2.0);
                                    speed_camera_flash[a] = CreateObject(18670,X, Y,(speed_cameras[a][2] + 4.5),0.0,0.0,0.0);
                                    speed_camera_stats[a] = 3;

                                }
                            }
                        }
                    }
                }
            }
            // Buildings
            for(new h = 0; h < sizeof(InteriorInfo); h++)
            {
            new string[128];
            if(IsPlayerInRangeOfPoint(i,1.5,InteriorInfo[h][iSpawnX], InteriorInfo[h][iSpawnY], InteriorInfo[h][iSpawnZ]))
            {
                format(string, sizeof(string), "%s", InteriorInfo[h][iNames]);
                GameTextForPlayer(i, string, 2000, 3);
                }
            }
        }
    }

    for(new b = 0; b < MAX_VEHICLES; b ++) { new Float:hp; GetVehicleHealth(b,hp); crash_vhp[b] = hp; }

}
Reply
#10

well, I can't really find a problem, but, lets NOT use the IsPlayerConnectedEx function, instead simply copy paste it.

pawn Код:
public CrashListener()
{

    for(new i = 0; i < MAX_PLAYERS; i ++)
    {

        if(IsPlayerConnected(i) && !IsPlayerNPC(i)) PlayerUpdateListener(i);
        if(IsPlayerConnected(i) && character_chosen[i])
        {

            if(IsPlayerInAnyVehicle(i) && !crash_detection_disabled[i])
            {

                new veh = GetPlayerVehicleID(i);
                new Float:hp;
                GetVehicleHealth(veh,hp);
                if(hp < crash_vhp[veh])
                {
not sure if it will work, but its worth a try.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)