[Big Problem] OnPlayerEnterVehicle [Help]
#1

When i enter in car i get this error's from crashdetecter:
pawn Код:
[00:24:44] [01:36:26] [debug] Run time error 4: "Array index out of bounds"
[01:36:26] [debug]  Accessing element at index 8 past array upper bound 7
[01:36:26] [debug] AMX backtrace:
[01:36:26] [debug] #0 00377578 in ?? (0x00000111) from PBRP.amx
[01:36:26] [debug] #1 001a4cd4 in ?? (0x00000000, 0x00000111, 0x00000000) from PBRP.amx
[01:36:26] [debug] #2 0000a8dc in public OnPlayerEnterVehicle (0x00000000, 0x00000111, 0x00000000) from PBRP.amx

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(!ispassenger)
    {
        if(IsDMVCar(vehicleid))
        {
            if(!LicenseTest[playerid])
            {
                new Float:pos[3];
                GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
                SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
                SendClientMessage(playerid, COLOR_ORANGE, "Ovo vozilo je na Drzava/AutoShop nemozes ga voziti.");
            }
            else
            {
                SendClientMessage(playerid, COLOR_LIGHTBLUE, "* GPS: Finish the test by driving through all of the checkpoints on your GPS.");
                SetPlayerCheckpoint(playerid,980.1932,-1407.9902,13.0956,5);
                SendClientMessage(playerid, COLOR_RED, "If you exit the car your test will be failed and it will have to be re-done.");
            }
        }
    }
    if(!ispassenger)
    {
        new id = GetVehicleID(vehicleid);
        if(IsValidVehicle(id) && VehicleCreated[id] == VEHICLE_PLAYER)
        {
            new msg[64];
            format(msg, sizeof(msg), "Ovo vozilo pripada %s", VehicleOwner[id]);
            SendClientMessage(playerid, COLOR_GREY, msg);
        }
    }
     if(IsAnTaxi(vehicleid) || IsAnBus(vehicleid))
        {
            if(PlayerInfo[playerid][pJob] == JOB_TAXI || PlayerInfo[playerid][pVIPJob] == JOB_TAXI)
            {
             SendClientMessage(playerid, COLOR_LIGHTBLUE, "* TAXI SLUZBA: Tvoja posla je da vozis ljudima do destinacije za odredjeni novac.");
            }
            else
            {
                 new Float:pos[3];
                GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
                SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
                 RemovePlayerFromVehicle(playerid);
                SendClientMessage(playerid, COLOR_GREY, "Ti nisi radnik za Taxi Firma.");
            }
        }
    if(IsVIPcar(vehicleid))
        {
            if(PlayerInfo[playerid][pVIP] < 0)
            {
             SendClientMessage(playerid, COLOR_LIGHTBLUE, "* VIP: Ovo je VIP vozilo!");
            }
            else
            {
                 new Float:pos[3];
                GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
                SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
                 RemovePlayerFromVehicle(playerid);
                SendClientMessage(playerid, COLOR_GREY, "Ti nisi VIP, ovoj je auto iz VIP Garaze!");
            }
        }
       if(IsPaukAuto(vehicleid))
        {
            if(!IsPaukSluzba(playerid))
            {
                new Float:pos[3];
                GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
                SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
                SendClientMessage(playerid, COLOR_GREY, "Ti nisi radnik za Pauk Sluzba.");
            }
            else
            {
                SendClientMessage(playerid, COLOR_LIGHTBLUE, "* PAUK SLUZBA: Tvoja posla je da uzimas pogresno parkirane auta.");
                SendClientMessage(playerid, COLOR_LIGHTBLUE, "* PAUK SLUZBA: Ukoliko ti treba pomoc od LSPD pricaj sa njima preku /d.");
            }
        }
       if(IsTRGovAuto(vehicleid))
        {
            if(!IsTRG(playerid))
            {
                new Float:pos[3];
                GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
                SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
                SendClientMessage(playerid, COLOR_GREY, "Ti ne radis za Tierra Robada Vlada.");
            }
            else
            {
                SendClientMessage(playerid, COLOR_TEAL, "* TR GOV: Tvoji posao je da ne dozvolis da SA uzme TR.");
                SendClientMessage(playerid, COLOR_TEAL, "* TR GOV: Pricaj sa svi organizacije u TR preko /trd");
            }
        }
        if(IsPaukLider(vehicleid))
        {
            if(!IsPaukSLider(playerid))
            {
                new Float:pos[3];
                GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
                SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
                SendClientMessage(playerid, COLOR_GREY, "Ti nisi lider/menadzer da bi vozio auto.");
            }
            else
            {
                SendClientMessage(playerid, COLOR_LIGHTBLUE, "* PAUK MENADZER: Ovo auto nesmes koristiti bez dozvolu Lidera.");
                SendClientMessage(playerid, COLOR_LIGHTBLUE, "* PAUK LIDER: Ukoliko se vozi ovo vozilo mora da se vrati u garazu.");
            }
        }
        if(IsTruckerVehicle(vehicleid))
        {
        if(PlayerInfo[playerid][pJob] == JOB_TRUCKER || PlayerInfo[playerid][pVIPJob] == JOB_TRUCKER)
            {
                SendClientMessage(playerid, COLOR_WHITE, "[{FFD200}INFO{FAFAFA}]: Usli ste u {00B9FF}Kamionu{FAFAFA}.");
                SendClientMessage(playerid, COLOR_WHITE, "[{FFD200}INFO{FAFAFA}]: Da bi utovarili kamion morate bidi na mesto za utovar {00B9FF}/utgps{FAFAFA}");
                SendClientMessage(playerid, COLOR_WHITE, "[{FFD200}INFO{FAFAFA}]: Kad ste na mesto da utovariot kamion {00B9FF}/utovaripaketi{FAFAFA}");
                SendClientMessage(playerid, COLOR_WHITE, "[{FFD200}INFO{FAFAFA}]: Kad ste na destinacija da bi dostavili paketa {00B9FF}/dostavipaketi{FAFAFA}");
            }
            else
            {
                new Float:pos[3];
                GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
                SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
                RemovePlayerFromVehicle(playerid);
                SendClientMessage(playerid, COLOR_WHITE,"[{FFD200}INFO{FAFAFA}]: Niste vozac {00B9FF}Kamione{FAFAFA}.");
            }
        }
        if(MechCar(vehicleid))
        {
            if(PlayerInfo[playerid][pJob] != JOB_MECHANIC && PlayerInfo[playerid][pVIPJob] != JOB_MECHANIC)
            {
                new Float:slx1, Float:sly1, Float:slz1;
                GetPlayerPos(playerid, slx1, sly1, slz1);
                SetPlayerPos(playerid, slx1, sly1, slz1+1.3);
                PlayerPlaySound(playerid, 1130, slx1, sly1, slz1+1.3);
                RemovePlayerFromVehicle(playerid);
                SendClientMessage(playerid, COLOR_GRAD2, "[{FFD200}INFO{FAFAFA}]: Ti nisi Mehanic!");
            }
        }
        if(PetrolCar(vehicleid))
        {
            if(PlayerInfo[playerid][pJob] != JOB_PETROL && PlayerInfo[playerid][pVIPJob] != JOB_PETROL)
            {
                new Float:slx2, Float:sly2, Float:slz2;
                GetPlayerPos(playerid, slx2, sly2, slz2);
                SetPlayerPos(playerid, slx2, sly2, slz2+1.3);
                PlayerPlaySound(playerid, 1130, slx2, sly2, slz2+1.3);
                RemovePlayerFromVehicle(playerid);
                SendClientMessage(playerid, COLOR_GRAD2, "[{FFD200}INFO{FAFAFA}]: Ti nisi vozac za Oil Petrola!");
            }
        }
        if(ProduCar(vehicleid))
        {
            if(PlayerInfo[playerid][pJob] != JOB_PRODUKTE && PlayerInfo[playerid][pVIPJob] != JOB_PRODUKTE)
            {
                new Float:slx3, Float:sly3, Float:slz3;
                GetPlayerPos(playerid, slx3, sly3, slz3);
                SetPlayerPos(playerid, slx3, sly3, slz3+1.3);
                PlayerPlaySound(playerid, 1130, slx3, sly3, slz3+1.3);
                RemovePlayerFromVehicle(playerid);
                SendClientMessage(playerid, COLOR_GRAD2, "[{FFD200}INFO{FAFAFA}]: Ti nisi Dostavjac Produkte!");
            }
        }
       else if(IsDLCar(vehicleid))
        {
                new Float:pos[3];
                GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
                SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
        }
        else if(IsFamVehicle(vehicleid) && Fam[vehicleid] != PlayerInfo[playerid][pFam] && !IsACop(playerid))
        {
            new Float:pos[3];
            GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
            SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
            SendClientMessage(playerid, COLOR_GREY, " Ti nemozes voziti ovo vozilo jer nisi u familija.");
        }
        else if(IsLeoVehicle(vehicleid) && PlayerInfo[playerid][pFac] != 1)
        {
            new Float:pos[3];
            GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
            SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
            SendClientMessage(playerid, COLOR_GREY, " Ovo vozilo pripada na LSPD.");
        }
        else if(IsLSFMDVehicle(vehicleid) && PlayerInfo[playerid][pFac] != 5)
        {
            new Float:pos[3];
            GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
            SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
            SendClientMessage(playerid, COLOR_ORANGE, " Ovo vozilo pripada na LSFMD.");
        }
        else if(IsNewsVehicle(vehicleid) && PlayerInfo[playerid][pFac] != 4)
        {
            new Float:pos[3];
            GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
            SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
            SendClientMessage(playerid, COLOR_GREY, " Ovo vozilo pripada na SaNews Agencija.");
        }
        else if(IsHitmanVehicle(vehicleid) && PlayerInfo[playerid][pFac] != 3)
        {
            new Float:pos[3];
            GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
            SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
            SendClientMessage(playerid, COLOR_GREY, " Ti nemozes da vozis vozilo registrovano na Agencije.");
        }
        else if(IsFBIVehicle(vehicleid) && PlayerInfo[playerid][pFac] != 6)
        {
            new Float:pos[3];
            GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
            SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
            SendClientMessage(playerid, COLOR_GREY, " Ovo vozilo pripada na FBI.");
        }
        else if(IsNGVehicle(vehicleid) && PlayerInfo[playerid][pFac] != 7)
        {
            new Float:pos[3];
            GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
            SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
            SendClientMessage(playerid, COLOR_GREY, " Ovo vozilo pripada na NG.");
        }
        else if(HotDogCar(vehicleid) && PlayerInfo[playerid][pFac] != 2)
        {
            new Float:pos[3];
            GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
            SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
            SendClientMessage(playerid, COLOR_GRAD2, "[{FFD200}INFO{FAFAFA}]: Ti nisi Dostavjac HotDog-a!");
        }
        else if(IsGovVehicle(vehicleid) && PlayerInfo[playerid][pFac] != 2)
        {
            new Float:pos[3];
            GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
            SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
            SendClientMessage(playerid, COLOR_GREY, " Ovo vozilo pripada na Vlada.");
        }
        return 1;

    }
Reply
#2

Update your crash detect and post again : https://github.com/Zeex/samp-plugin-...etect/releases
Reply
#3

Quote:
Originally Posted by Mahde
Посмотреть сообщение
Update your crash detect and post again : https://github.com/Zeex/samp-plugin-...etect/releases
Its not problem with the crashdetecter also im using the latest version, its problem in the code.
Reply
#4

This happend when i add twice this:

First #1:
pawn Код:
if(ProduCar(vehicleid))
        {
            if(PlayerInfo[playerid][pJob] != JOB_PRODUKTE && PlayerInfo[playerid][pVIPJob] != JOB_PRODUKTE)
            {
                new Float:slx, Float:sly, Float:slz;
                GetPlayerPos(playerid, slx, sly, slz);
                SetPlayerPos(playerid, slx, sly, slz+1.3);
                PlayerPlaySound(playerid, 1130, slx, sly, slz+1.3);
                RemovePlayerFromVehicle(playerid);
                SendClientMessage(playerid, COLOR_GRAD2, "[{FFD200}INFO{FAFAFA}]: Ti nisi Dostavjac Produkte!");
            }
        }
Second #2:
pawn Код:
else if(MechCar(vehicleid))
        {
            if(PlayerInfo[playerid][pJob] != JOB_MECHANIC && PlayerInfo[playerid][pVIPJob] != JOB_MECHANIC)
            {
                new Float:slx, Float:sly, Float:slz;
                GetPlayerPos(playerid, slx, sly, slz);
                SetPlayerPos(playerid, slx, sly, slz+1.3);
                PlayerPlaySound(playerid, 1130, slx, sly, slz+1.3);
                RemovePlayerFromVehicle(playerid);
                SendClientMessage(playerid, COLOR_GRAD2, "[{FFD200}INFO{FAFAFA}]: Ti nisi Mehanic!");
            }
        }
The crashdetect gives me always that error if there is only the first one the crash is gone but i need to add for all vehicles whih are only used for the Jobs.
Reply
#5

put simply it means that you have a certain array, and you're trying to access an index of that array that does not exist

for example
new arr[5];
printf("%d",arr[8])];

obviously the array does not have the index 8, it's upper index is 4
Reply
#6

Quote:
Originally Posted by cessil
Посмотреть сообщение
put simply it means that you have a certain array, and you're trying to access an index of that array that does not exist

for example
new arr[5];
printf("%d",arr[8])];

obviously the array does not have the index 8, it's upper index is 4
How i can see the code there no problem with the array?
Up i post the full code of "OnPlayerEnterVehicle"
Reply
#7

Quote:
Originally Posted by GBLTeam
Посмотреть сообщение
Its not problem with the crashdetecter also im using the latest version, its problem in the code.
The new update of CrashDetect is detecting the line which crashing the server !
Reply
#8

Quote:
Originally Posted by Mahde
Посмотреть сообщение
The new update of CrashDetect is detecting the line which crashing the server !
Not really, he has to compile with -d3 if he wants crashdetect to show him lines
Reply
#9

Quote:
Originally Posted by BenzoAMG
Посмотреть сообщение
This would probably work better for you. (Hopefully)

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
        new vehicleid = GetPlayerVehicleID(playerid);
        if(IsDMVCar(vehicleid))
        {
            if(!LicenseTest[playerid])
            {
                RemovePlayerFromVehicle(playerid);
                SendClientMessage(playerid, COLOR_ORANGE, "Ovo vozilo je na Drzava/AutoShop nemozes ga voziti.");
            }
            else
            {
                SendClientMessage(playerid, COLOR_LIGHTBLUE, "* GPS: Finish the test by driving through all of the checkpoints on your GPS.");
                SetPlayerCheckpoint(playerid, 980.1932, -1407.9902, 13.0956, 5);
                SendClientMessage(playerid, COLOR_RED, "If you exit the car your test will be failed and it will have to be re-done.");
            }
        }
        if(VehicleCreated[vehicleid] == VEHICLE_PLAYER)
        {
            new msg[45];
            format(msg, sizeof(msg), "Ovo vozilo pripada %s", VehicleOwner[vehicleid]);
            SendClientMessage(playerid, COLOR_GREY, msg);
        }
        if(IsAnTaxi(vehicleid) || IsAnBus(vehicleid))
        {
            if(PlayerInfo[playerid][pJob] == JOB_TAXI || PlayerInfo[playerid][pVIPJob] == JOB_TAXI) SendClientMessage(playerid, COLOR_LIGHTBLUE, "* TAXI SLUZBA: Tvoja posla je da vozis ljudima do destinacije za odredjeni novac.");
            else
            {
                RemovePlayerFromVehicle(playerid);
                SendClientMessage(playerid, COLOR_GREY, "Ti nisi radnik za Taxi Firma.");
            }
        }
        else if(IsPaukAuto(vehicleid))
        {
            if(!IsPaukSluzba(playerid))
            {
                RemovePlayerFromVehicle(playerid);
                SendClientMessage(playerid, COLOR_GREY, "Ti nisi radnik za Pauk Sluzba.");
            }
            else
            {
                SendClientMessage(playerid, COLOR_LIGHTBLUE, "* PAUK SLUZBA: Tvoja posla je da uzimas pogresno parkirane auta.");
                SendClientMessage(playerid, COLOR_LIGHTBLUE, "* PAUK SLUZBA: Ukoliko ti treba pomoc od LSPD pricaj sa njima preku /d.");
            }
        }
        else if(IsTRGovAuto(vehicleid))
        {
            if(!IsTRG(playerid))
            {
                RemovePlayerFromVehicle(playerid);
                SendClientMessage(playerid, COLOR_GREY, "Ti ne radis za Tierra Robada Vlada.");
            }
            else
            {
                SendClientMessage(playerid, COLOR_TEAL, "* TR GOV: Tvoji posao je da ne dozvolis da SA uzme TR.");
                SendClientMessage(playerid, COLOR_TEAL, "* TR GOV: Pricaj sa svi organizacije u TR preko /trd");
            }
        }
        else if(IsPaukLider(vehicleid))
        {
            if(!IsPaukSLider(playerid))
            {
                RemovePlayerFromVehicle(playerid);
                SendClientMessage(playerid, COLOR_GREY, "Ti nisi lider/menadzer da bi vozio auto.");
            }
            else
            {
                SendClientMessage(playerid, COLOR_LIGHTBLUE, "* PAUK MENADZER: Ovo auto nesmes koristiti bez dozvolu Lidera.");
                SendClientMessage(playerid, COLOR_LIGHTBLUE, "* PAUK LIDER: Ukoliko se vozi ovo vozilo mora da se vrati u garazu.");
            }  
        }
        else if(IsTruckerVehicle(vehicleid))
        {
            if(PlayerInfo[playerid][pJob] == JOB_TRUCKER || PlayerInfo[playerid][pVIPJob] == JOB_TRUCKER)
            {
                SendClientMessage(playerid, COLOR_WHITE, "[{FFD200}INFO{FAFAFA}]: Usli ste u {00B9FF}Kamionu{FAFAFA}.");
                SendClientMessage(playerid, COLOR_WHITE, "[{FFD200}INFO{FAFAFA}]: Da bi utovarili kamion morate bidi na mesto za utovar {00B9FF}/utgps{FAFAFA}");
                SendClientMessage(playerid, COLOR_WHITE, "[{FFD200}INFO{FAFAFA}]: Kad ste na mesto da utovariot kamion {00B9FF}/utovaripaketi{FAFAFA}");
                SendClientMessage(playerid, COLOR_WHITE, "[{FFD200}INFO{FAFAFA}]: Kad ste na destinacija da bi dostavili paketa {00B9FF}/dostavipaketi{FAFAFA}");
            }
            else
            {
                RemovePlayerFromVehicle(playerid);
                SendClientMessage(playerid, COLOR_WHITE,"[{FFD200}INFO{FAFAFA}]: Niste vozac {00B9FF}Kamione{FAFAFA}.");
            }
        }
        else if(MechCar(vehicleid))
        {
            if(PlayerInfo[playerid][pJob] != JOB_MECHANIC && PlayerInfo[playerid][pVIPJob] != JOB_MECHANIC)
            {
                PlayerPlaySound(playerid, 1130);
                RemovePlayerFromVehicle(playerid);
                SendClientMessage(playerid, COLOR_GRAD2, "[{FFD200}INFO{FAFAFA}]: Ti nisi Mehanic!");
            }
        }
        else if(PetrolCar(vehicleid))
        {
            if(PlayerInfo[playerid][pJob] != JOB_PETROL && PlayerInfo[playerid][pVIPJob] != JOB_PETROL)
            {
                PlayerPlaySound(playerid, 1130);
                RemovePlayerFromVehicle(playerid);
                SendClientMessage(playerid, COLOR_GRAD2, "[{FFD200}INFO{FAFAFA}]: Ti nisi vozac za Oil Petrola!");
            }
        }
        else if(ProduCar(vehicleid))
        {
            if(PlayerInfo[playerid][pJob] != JOB_PRODUKTE && PlayerInfo[playerid][pVIPJob] != JOB_PRODUKTE)
            {
                PlayerPlaySound(playerid, 1130);
                RemovePlayerFromVehicle(playerid);
                SendClientMessage(playerid, COLOR_GRAD2, "[{FFD200}INFO{FAFAFA}]: Ti nisi Dostavjac Produkte!");
            }
        }
        else if(HotDogCar(vehicleid))
        {
            if(PlayerInfo[playerid][pJob] != JOB_HOTDOG && PlayerInfo[playerid][pVIPJob] != JOB_HOTDOG)
            {
                PlayerPlaySound(playerid, 1130);
                RemovePlayerFromVehicle(playerid);
                SendClientMessage(playerid, COLOR_GRAD2, "[{FFD200}INFO{FAFAFA}]: Ti nisi Dostavjac HotDog-a!");
            }
        }
        else if(IsDLCar(vehicleid)) RemovePlayerFromVehicle(playerid);
        else if(IsFamVehicle(vehicleid) && Fam[vehicleid] != PlayerInfo[playerid][pFam] && !IsACop(playerid))
        {
            RemovePlayerFromVehicle(playerid);
            SendClientMessage(playerid, COLOR_GREY, " Ti nemozes voziti ovo vozilo jer nisi u familija.");
        }
        else if(IsLeoVehicle(vehicleid) && PlayerInfo[playerid][pFac] != 1)
        {
            RemovePlayerFromVehicle(playerid);
            SendClientMessage(playerid, COLOR_GREY, " Ovo vozilo pripada na LSPD.");
        }
        else if(IsLSFMDVehicle(vehicleid) && PlayerInfo[playerid][pFac] != 5)
        {
            RemovePlayerFromVehicle(playerid);
            SendClientMessage(playerid, COLOR_ORANGE, " Ovo vozilo pripada na LSFMD.");
        }
        else if(IsNewsVehicle(vehicleid) && PlayerInfo[playerid][pFac] != 4)
        {
            RemovePlayerFromVehicle(playerid);
            SendClientMessage(playerid, COLOR_GREY, " Ovo vozilo pripada na SaNews Agencija.");
        }
        else if(IsHitmanVehicle(vehicleid) && PlayerInfo[playerid][pFac] != 3)
        {
            RemovePlayerFromVehicle(playerid);
            SendClientMessage(playerid, COLOR_GREY, " Ti nemozes da vozis vozilo registrovano na Agencije.");
        }
        else if(IsFBIVehicle(vehicleid) && PlayerInfo[playerid][pFac] != 6)
        {
            RemovePlayerFromVehicle(playerid);
            SendClientMessage(playerid, COLOR_GREY, " Ovo vozilo pripada na FBI.");
        }
        else if(IsNGVehicle(vehicleid) && PlayerInfo[playerid][pFac] != 7)
        {
            RemovePlayerFromVehicle(playerid);
            SendClientMessage(playerid, COLOR_GREY, " Ovo vozilo pripada na NG.");
        }
        else if(IsGovVehicle(vehicleid) && PlayerInfo[playerid][pFac] != 2)
        {
            RemovePlayerFromVehicle(playerid);
            SendClientMessage(playerid, COLOR_GREY, " Ovo vozilo pripada na Vlada.");
        }
    }
    return 1;
}
To put this under OnPlayerStateChange or to change with the past?
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
Quote:
Originally Posted by Mahde
Посмотреть сообщение
The new update of CrashDetect is detecting the line which crashing the server !
Im using the latest update of the crashdetect.

Quote:
Originally Posted by kirollos
Посмотреть сообщение
Not really, he has to compile with -d3 if he wants crashdetect to show him lines
How to compile it with -d3? You mean to use the crashdetect include?
Reply
#10

Quote:
Originally Posted by GBLTeam
Посмотреть сообщение
To put this under OnPlayerStateChange or to change with the past?
How to compile it with -d3? You mean to use the crashdetect include?
No, simply create a file in your pawno folder called "pawn.cfg" and add to it -d3

Then compile your script and enter a vehicle and crashdetect will report more information about the crash.

More Info about how does -d3 work:

https://sampforum.blast.hk/showthread.php?tid=262796
http://forum.sa-mp.com/showpost.php?...32&postcount=7

EDIT: The problem doesn't seem to be with OnPlayerStateChange, it took me a while to realise that you posted the "crash" error
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)