Run time error 4
#1

[24/02/2018 14:48:01] [debug] #0 002de31c in public OnPlayerStateChange (0, 1, from GRP.amx
[24/02/2018 14:49:44] [debug] Run time error 4: "Array index out of bounds"
[24/02/2018 14:49:44] [debug] AMX backtrace:
[24/02/2018 14:49:44] [debug] #0 002ac48c in public SSCANF_OnPlayerDisconnect (0, 1) from GRP.amx
[24/02/2018 14:49:44] [debug] #1 00039d3c in public _y_utils_OnPlayerDisconnect (0, 1) from GRP.amx
[24/02/2018 14:49:44] [debug] #2 0000af60 in ?? (0, 1, 0, 0, 0, 8, 0, 1, 0, 0, ... <1073741813 arguments>) from GRP.amx
[24/02/2018 14:49:44] [debug] #3 0000f118 in public OnPlayerDisconnect (0, 1) from GRP.amx
PHP код:
public OnPlayerStateChange(playeridnewstateoldstate)
{
    if(
GettingSpectated[playerid] != -1)
    {
        new 
spectator GettingSpectated[playerid];
        if(!
IsPlayerConnected(spectator))
        {
            
GettingSpectated[playerid] = -1;
            
Spectate[spectator] = -1;
        }
        if(
newstate == PLAYER_STATE_DRIVER && PlayerInfo[spectator][pAdmin] >= || newstate == PLAYER_STATE_PASSENGER && PlayerInfo[spectator][pAdmin] >= 2)
        {
            
TogglePlayerSpectating(spectatortrue);
            new 
carid GetPlayerVehicleID(playerid);
            
PlayerSpectateVehicle(spectatorcarid);
        }
        else if(
newstate == PLAYER_STATE_ONFOOT && PlayerInfo[spectator][pAdmin] >= 2)
        {
            
TogglePlayerSpectating(spectatortrue);
            
PlayerSpectatePlayer(spectatorplayerid);
            
SetPlayerInterior(spectatorGetPlayerInterior(playerid));
        }
    }
    
// Benzin Sistemi
    
if (newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
    {
        new 
vid GetPlayerVehicleID(playerid);
        new 
string[125];
        
format(string,sizeof string,"",fuel[vid]);
        
//     TextDrawSetString(td_fuel[playerid],string);
        
TextDrawShowForPlayer(playerid,td_fuel[playerid]);
    }
    else
    {
        
TextDrawHideForPlayer(playerid,td_fuel[playerid]);
    }
    new 
vehicleid GetPlayerVehicleID(playerid);
    if(
newstate == PLAYER_STATE_DRIVER && (!IsAVipCar(vehicleid) || GetVehicleModel(vehicleid) != 481 || GetVehicleModel(vehicleid) != 509 || GetVehicleModel(vehicleid) != 510))
    {
        
SetPVarInt(playerid"fuelonoff"1);
        
textdrawscount++;
    }
    if((
newstate == || newstate == || newstate == || newstate == 9) && pTazer[playerid] == 1)
    {
        
RemovePlayerWeapon(playerid23);
        
GivePlayerValidWeapon(playeridpTazerReplace[playerid], 60000);
        
pTazer[playerid] = 0;
    }
    if(
newstate == PLAYER_STATE_ONFOOT)
    {
        if(
MP3Station[playerid] == 0)
        {
            
StopAudioStreamForPlayer(playerid);
        }
        else
        {
            new
            
MP3Station[playerid]-1;
            
PlayAudioStreamForPlayer(playeridVehicleRadioListing[t][radiourl]);
        }
        if(
GettingSpectated[playerid] < MAX_PLAYERS && PlayerInfo[GettingSpectated[playerid]][pAdmin] >= 2)
        {
            new 
spectator GettingSpectated[playerid];
            
// Preventing possible buffer overflows with the arrays
            
TogglePlayerSpectating(spectatortrue);
            
PlayerSpectatePlayer(spectatorplayerid);
            
SetPlayerInterior(spectatorGetPlayerInterior(playerid));
            
SetPlayerInterior(spectatorGetPlayerInterior(playerid));
            
SetPlayerVirtualWorld(spectatorGetPlayerVirtualWorld(playerid));
        }
        if(
ConnectedToPC[playerid] == 1337)//mvb
        
{
            
SendClientMessage(playeridCOLOR_LIGHTBLUE"* MVB'den зıkış yaptın.");
            
ConnectedToPC[playerid] = 0;
        }
        if(
RadarActive[playerid] == 1)//mvb speed radar
        
{
            
SendClientMessage(playeridCOLOR_LIGHTBLUE"* MVB Hız radarını kapattın.");
            
RadarActive[playerid] = 0;
            
TextDrawDestroy(RadarTitle[playerid]);
            
TextDrawDestroy(RadarContext[playerid]);
        }
        if(
TransportDuty[playerid] > 0)
        {
            if(
TransportDuty[playerid] == 1)
            {
                
TaxiDrivers -= 1;
            }
            else if(
TransportDuty[playerid] == 2)
            {
                
BusDrivers -= 1;
            }
            
TransportDuty[playerid] = 0;
            new 
string[42];
            
format(stringsizeof(string), "* İşbaşından зıktın ve $%d kazandın."TransportMoney[playerid]);
            
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
            
GivePlayerCash(playeridTransportMoney[playerid]);
            
ConsumingMoney[playerid] = 1;
            
TransportValue[playerid] = 0;
            
TransportMoney[playerid] = 0;
            
SetPlayerColor(playeridTEAM_HIT_COLOR);
            
TransportTime[playerid] = 0;
            
TransportCost[playerid] = 0;
        }
        if(
TransportDriver[playerid] < MAX_PLAYERS && AdminDuty[playerid] == 0)
        {
            new 
string[128];
            
TransportMoney[TransportDriver[playerid]] += TransportCost[playerid];
            
format(stringsizeof(string), "~w~Taksi ucreti~n~~r~$%d",TransportCost[playerid]);
            
GameTextForPlayer(playeridstring50003);
            
format(stringsizeof(string), "~w~Musteri taksiden ayrildi~n~~g~Kazanilan $%d",TransportCost[playerid]);
            
GameTextForPlayer(TransportDriver[playerid], string50003);
            
GivePlayerCash(playerid, -TransportCost[playerid]);
            new 
ip[32], ipex[32];
            
GetPlayerIp(playeridipsizeof(ip));
            
GetPlayerIp(TransportDriver[playerid], ipexsizeof(ipex));
            
TaxiWarn[playerid][TransportDriver[playerid]] += TransportCost[playerid];
            if(
TaxiWarn[playerid][TransportDriver[playerid]] >= 10000)
            {
                
format(stringsizeof(string), "%s (IP:%s), %s (IP:%s)'ı istediği yere gцtьrdь ve $%d kazandı."GetPlayerNameEx(playerid), ipGetPlayerNameEx(TransportDriver[playerid]), ipexTaxiWarn[playerid][TransportDriver[playerid]]);
                
//Log("logs/pay.log", string);
                
ABroadCast(COLOR_YELLOWstring1);
            }
            
TransportTime[TransportDriver[playerid]] = 0;
            
TransportCost[TransportDriver[playerid]] = 0;
            
TransportCost[playerid] = 0;
            
TransportTime[playerid] = 0;
            
TransportDriver[playerid] = -1;
        }
        
TelePos[playerid][0] = 0.0;
        
TelePos[playerid][1] = 0.0;
    }
    if(
newstate == PLAYER_STATE_WASTED)
    {
        if(
GetPVarInt(playerid"EventToken") == && AdminDuty[playerid] == 0)
        {
            
SetPVarInt(playerid"DoktorMasrafi"1);
        }
    }
    if(
newstate == PLAYER_STATE_PASSENGER)
    {
        
fVehSpeed[playerid] = 0;
        
gLastCar[playerid] = vehicleid;
        if(
PlayerInfo[playerid][pGuns][4] > 0)    SetPlayerArmedWeapon(playerid,PlayerInfo[playerid][pGuns][4]);
        else 
SetPlayerArmedWeapon(playerid,0);
        if(
GetPVarInt(playerid"ToBeEjected") >= 1)
        {
            
SetPVarInt(playerid"ToBeEjected"0);
            
RemovePlayerFromVehicle(playerid);
            new 
Float:XFloat:YFloat:Z;
            
GetPlayerPos(playeridXYZ);
            
SetPlayerPos(playeridXYZ+2);
            if(
GetPVarInt(playerid"Injured") == 1)
            {
                
Streamer_UpdateEx(playeridGetPVarFloat(playerid,"MedicX"), GetPVarFloat(playerid,"MedicY"), GetPVarFloat(playerid,"MedicZ"));
                
SetPlayerPos(playeridGetPVarFloat(playerid,"MedicX"), GetPVarFloat(playerid,"MedicY"), GetPVarFloat(playerid,"MedicZ"));
                
SetPlayerVirtualWorld(playeridGetPVarInt(playerid,"MedicVW"));
                
SetPlayerInterior(playeridGetPVarInt(playerid,"MedicInt"));
                
ClearAnimations(playerid1);
                
ApplyAnimation(playerid"KNIFE""KILL_Knife_Ped_Die"4.0011101);
            }
        }
        if(
VehicleRadioStation[GetPlayerVehicleID(playerid)] != 0)
        {
            new 
getradio VehicleRadioStation[GetPlayerVehicleID(playerid)]-1;
            
PlayAudioStreamForPlayer(playeridVehicleRadioListing[getradio][radiourl]);
        }
        foreach(new 
Player)
        {
            if(
IsPlayerInVehicle(ivehicleid) && GetPlayerState(i) == && TransportDuty[i] > && AdminDuty[playerid] == 0)
            {
                if(
GetPlayerCash(playerid) < TransportValue[i])
                {
                    new 
string[128];
                    
format(stringsizeof(string), "Binebilmek iзin $%d'a ihtiyacın var."TransportValue[i]);
                    
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
                    
RemovePlayerFromVehicle(playerid);
                    new 
Float:XFloat:YFloat:Z;
                    
GetPlayerPos(playeridXYZ);
                    
SetPlayerPos(playeridXYZ+2);
                    
TogglePlayerControllable(playerid1);
                }
                else
                {
                    new 
string[128];
                    if(
TransportDuty[i] == && AdminDuty[playerid] == 0)
                    {
                        
format(stringsizeof(string), "* Taksi şofцrьne $%d para цdedin."TransportValue[i]);
                        
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
                        
format(stringsizeof(string), "* %s adlı mьşteri taksi aracınıza bindi."GetPlayerNameEx(playerid));
                        
SendClientMessage(iCOLOR_LIGHTBLUEstring);
                        
TransportTime[i] = 1;
                        
TransportTime[playerid] = 1;
                        
TransportCost[playerid] = TransportValue[i];
                        
TransportCost[i] = TransportValue[i];
                        
TransportDriver[playerid] = i;
                    }
                    else if(
TransportDuty[i] == 2)
                    {
                        
format(stringsizeof(string), "* Taksi şofцrьne $%d para цdedin."TransportValue[i]);
                        
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
                        
format(stringsizeof(string), "* %s adlı mьşteri taksi aracınıza bindi."GetPlayerNameEx(playerid));
                        
SendClientMessage(iCOLOR_LIGHTBLUEstring);
                    }
                    
GivePlayerCash(playerid, - TransportValue[i]);
                    
TransportMoney[i] += TransportValue[i];
                }
            }
        }
    }
    if(
newstate == PLAYER_STATE_DRIVER)
    {
        
fVehSpeed[playerid] = 0;
        
SetPlayerArmedWeapon(playerid0);
        if(
VehicleRadioStation[GetPlayerVehicleID(playerid)] == 0)
        {
            
SendClientMessage(playeridCOLOR_WHITE"{66CCFF}Radyo Istasyonu: Yok - {66CCFF}Tьr:{66CCFF} Yok {FF0000} (/radyoac)");
            
SendClientMessage(playeridCOLOR_WHITE"{66CCFF}Aracınızı зalıştırmak iзin (/amotor) komutunu ve [N] tuşunu kullanabilirsiniz.");
            if(!
PlayerInfo[playerid][pCarLic]) SendClientMessage(playeridCOLOR_LIGHTRED" Ehliyetin yok, polislere dikkat etmelisin.");
            
SendClientMessage(playeridCOLOR_WHITE"{66CCFF}Aracınızın icinde (/emniyetkemeri) komutunu kullanabilirsiniz. ");
        }
        if(
VehicleRadioStation[GetPlayerVehicleID(playerid)] != 0)
        {
            new 
getradio VehicleRadioStation[GetPlayerVehicleID(playerid)]-1;
            
PlayAudioStreamForPlayer(playeridVehicleRadioListing[getradio][radiourl]);
            new 
genre[18];
            if(
getradio >= && getradio <= 9genre "Alternatif";
            new 
string[128];
            
format(stringsizeof(string), "{66CCFF}Radyo Istasyonu: %s - {66CCFF}Tьr:{66CCFF} %s {FF0000} (/radyoac)"VehicleRadioListing[getradio][radioname], genre);
            
SendClientMessage(playeridCOLOR_WHITEstring);
        }
        new
        
newcar GetPlayerVehicleID(playerid),
        
v;
        
gLastCar[playerid] = newcar;
        if(
GetPVarInt(playerid"ToBeEjected") >= 1)
        {
            
SetPVarInt(playerid"ToBeEjected"0);
            
RemovePlayerFromVehicle(playerid);
            new 
Float:XFloat:YFloat:Z;
            
GetPlayerPos(playeridXYZ);
            
SetPlayerPos(playeridXYZ+2);
            if(
GetPVarInt(playerid"Injured") == 1)
            {
                
Streamer_UpdateEx(playeridGetPVarFloat(playerid,"MedicX"), GetPVarFloat(playerid,"MedicY"), GetPVarFloat(playerid,"MedicZ"));
                
SetPlayerPos(playeridGetPVarFloat(playerid,"MedicX"), GetPVarFloat(playerid,"MedicY"), GetPVarFloat(playerid,"MedicZ"));
                
SetPlayerVirtualWorld(playeridGetPVarInt(playerid,"MedicVW"));
                
SetPlayerInterior(playeridGetPVarInt(playerid,"MedicInt"));
                
ClearAnimations(playerid1);
                
ApplyAnimation(playerid"KNIFE""KILL_Knife_Ped_Die"4.0011101);
            }
        }
        
TelePos[playerid][0] = 0.0;
        
TelePos[playerid][1] = 0.0;
        if(
GetCarDealershipVehicleId(newcar) != -&& GetCarDealershipVehicleId(newcar) == GetPVarInt(playerid"editingcdveh")) return 1;
        if(
GetCarDealershipVehicleId(newcar) != -1)
        {
            new 
string[57 20 4];
            
format(stringsizeof(string),"Bu %s model aracı almak ister misin?\n\nBu aracın fiyatı $%d."GetVehicleName(newcar), CarDealershipInfo[GetCarDealershipId(newcar)][cdVehicleCost][GetCarDealershipVehicleId(newcar)]);
            
ShowPlayerDialogEx(playerid,DIALOG_CDBUY,DIALOG_STYLE_MSGBOX,"Uyarı:",string,"Satın Al","Iptal");
            
TogglePlayerControllable(playeridfalse);
            return 
1;
        }
        foreach(new 
Player)
        {
            
GetPlayerVehicle(inewcar);
            if(
!= -1)
            {
                if(
== playerid)
                {
                    new
                    
string[96];
                    
format(stringsizeof(string),"Bu %s model aracın sahibisin."GetVehicleName(newcar));
                    
SendClientMessage(playeridCOLOR_GREYstring);
                    if(
PlayerVehicleInfo[i][v][pvTicket] != 0)
                    {
                        
format(stringsizeof(string),"Aracına LSPD memurları tarafından $%d'lık bir ceza bırakılmış. Dillimore'deki DMV'den bu cezayı цdemek zorundasın."PlayerVehicleInfo[i][v][pvTicket]);
                        
SendClientMessage(playeridCOLOR_GREYstring);
                        
SendClientMessage(playeridCOLOR_GREY"Bu cezayı цdemezsen aracın bağlanabilir, hatta hapse bile girebilirsin.");
                    }
                }
                else if(
== PlayerInfo[playerid][pVehicleKeysFrom])
                {
                    new
                    
string[64 MAX_PLAYER_NAME];
                    
format(stringsizeof(string),"Modeli %s olan bu aracın anahtarlarına sahipsin. Sahibi: %s"GetVehicleName(newcar), GetPlayerNameEx(i));
                    
SendClientMessage(playeridCOLOR_GREYstring);
                }
                else if(
PlayerVehicleInfo[i][v][pvLocked] == && PlayerVehicleInfo[i][v][pvLock] == 1)
                {
                    
GetVehicleParamsEx(newcar,engine,lights,alarm,doors,bonnet,boot,objective);
                    
SetVehicleParamsEx(newcar,engine,lights,VEHICLE_PARAMS_ON,doors,bonnet,boot,objective);
                    
SetTimerEx("DisableVehicleAlarm"200000"d",  newcar);
                }
                
/*else if(PlayerVehicleInfo[i][v][pvLocked] == 1 && PlayerVehicleInfo[i][v][pvLock] == 2) {
                                    new
                                        string[49 + MAX_PLAYER_NAME];
                                      if(PlayerInfo[playerid][pAdmin] < 2)
                                    {
                                        format(string, sizeof(string), "* %s has been stunned by the electric anti-theft.",GetPlayerNameEx(playerid));
                                        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                                        new Float:X, Float:Y, Float:Z, Float:HP;
                                         GetPlayerPos(playerid, X, Y, Z);
                                        //SendAudioToRange(64, 100, X, Y, Z, 20.0);
                                         SetPlayerPos(playerid, X + 1, Y, Z);
                                         RemovePlayerFromVehicle(playerid);
                                         SetPVarInt(playerid, "IsFrozen", 1);
                                        TogglePlayerControllable(playerid,0);
                                        SetTimerEx("ReleasePlayer", 10000, 0, "d", playerid);
                                        GameTextForPlayer(playerid,"~r~STUNNED!",11000,3);
                                        GetPlayerHealth(playerid,HP);
                                        SetPlayerHealth(playerid,HP-15);
                                    }
                                    else
                                    {
                                        format(string, sizeof(string), "Warning: This %s is owned by %s.", GetVehicleName(newcar), GetPlayerNameEx(i));
                                          SendClientMessage(playerid, COLOR_GREY, string);
                                    }
                                }*/
                
return 1;
            }
        }
        for(new 
0MAX_FAMILYf++)
        {
            
GetGangVehicle(fnewcar);
            if(
!= -1)
            {
                new 
string[49 MAX_PLAYER_NAME];
                if(
PlayerInfo[playerid][pGang] == f)
                {
                    
format(stringsizeof(string), "%s model aracın sahibi olan ailedensin."GetVehicleName(newcar));
                    
SendClientMessage(playeridCOLOR_GREYstring);
                }
                else if(
FamilyVehicleInfo[f][v][fvLocked] == && FamilyVehicleInfo[f][v][fvLock] == 1)
                {
                    
GetVehicleParamsEx(newcar,engine,lights,alarm,doors,bonnet,boot,objective);
                    
SetVehicleParamsEx(newcar,engine,lights,VEHICLE_PARAMS_ON,doors,bonnet,boot,objective);
                    
SetTimerEx("DisableVehicleAlarm"200000"d",  newcar);
                }
                
/*else if(FamilyVehicleInfo[f][v][fvLocked] == 1 && FamilyVehicleInfo[f][v][fvLock] == 2)
                                {
                                    format(string, sizeof(string), "* %s has been stunned by the electric anti-theft.",GetPlayerNameEx(playerid));
                                    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                                    new Float:X, Float:Y, Float:Z, Float:HP;
                                    GetPlayerPos(playerid, X, Y, Z);
                                    //SendAudioToRange(64, 100, X, Y, Z, 20.0);
                                    SetPlayerPos(playerid, X + 1, Y, Z);
                                    RemovePlayerFromVehicle(playerid);
                                    new Float:slx, Float:sly, Float:slz;
                                    GetPlayerPos(playerid, slx, sly, slz);
                                    SetPlayerPos(playerid, slx, sly, slz);
                                    SetPVarInt(playerid, "IsFrozen", 1);
                                    TogglePlayerControllable(playerid,0);
                                    SetTimerEx("ReleasePlayer", 10000, 0, "d", playerid);
                                    GameTextForPlayer(playerid,"~r~STUNNED!",11000,3);
                                    GetPlayerHealth(playerid,HP);
                                    SetPlayerHealth(playerid,HP-15);
                                }*/
                
return 1;
            }
        }
        if(
IsACopCar(vehicleid))
        {
            if(
PlayerInfo[playerid][pFaction] == 1||PlayerInfo[playerid][pLeader] == || PlayerInfo[playerid][pFaction] == || PlayerInfo[playerid][pLeader] == 2)
            {
            }
            else
            {
                
RemovePlayerFromVehicle(playerid);
                new 
Float:slxFloat:slyFloat:slz;
                
GetPlayerPos(playeridslxslyslz);
                
SetPlayerPos(playeridslxslyslz);
                
defer NOPCheck(playerid);
                
SendClientMessage(playeridCOLOR_GRAD2"LSPD'den değilsin!");
            }
        }
        else if(
IsAFBICar(vehicleid))
        {
            if(
PlayerInfo[playerid][pFaction] == 2||PlayerInfo[playerid][pLeader] == 2)
            {
            }
            else
            {
                
RemovePlayerFromVehicle(playerid);
                new 
Float:slxFloat:slyFloat:slz;
                
GetPlayerPos(playeridslxslyslz);
                
SetPlayerPos(playeridslxslyslz);
                
defer NOPCheck(playerid);
                
SendClientMessage(playeridCOLOR_GRAD2"FBI'dan değilsin.");
            }
        }
        else if(
vehicleid == LSFMDVehicles[12] || vehicleid == LSFMDVehicles[33] || vehicleid == LSFMDVehicles[34] || vehicleid == LSFMDVehicles[35])
        {
            if(
PlayerInfo[playerid][pLeader] == || PlayerInfo[playerid][pFaction] == && PlayerInfo[playerid][pDivision] == 3)
            {
            }
            else
            {
                
RemovePlayerFromVehicle(playerid);
                new 
Float:slxFloat:slyFloat:slz;
                
GetPlayerPos(playeridslxslyslz);
                
SetPlayerPos(playeridslxslyslz);
                
defer NOPCheck(playerid);
                
SendClientMessage(playeridCOLOR_GRAD2"Yangın Departmanı biriminde değilsin.");
            }
        }
        else if(
vehicleid == TemizlikVehicles[0] || vehicleid == TemizlikVehicles[1] || vehicleid == TemizlikVehicles[2] || vehicleid == TemizlikVehicles[3] || vehicleid == TemizlikVehicles[4] || vehicleid == TemizlikVehicles[5] || vehicleid == TemizlikVehicles[6] || vehicleid == TemizlikVehicles[7])
        {
            if(
PlayerInfo[playerid][pJob] == 23 || PlayerInfo[playerid][pJob2] == 23)
            {
            }
            else
            {
                
RemovePlayerFromVehicle(playerid);
                new 
Float:slxFloat:slyFloat:slz;
                
GetPlayerPos(playeridslxslyslz);
                
SetPlayerPos(playeridslxslyslz);
                
defer NOPCheck(playerid);
                
SendClientMessage(playeridCOLOR_GRAD2"Temizlikзi değilsin.");
            }
        }
        else if(
vehicleid == TirVehicles[0] || vehicleid == TirVehicles[1] || vehicleid == TirVehicles[2] || vehicleid == TirVehicles[3] || vehicleid == TirVehicles[4] || vehicleid == TirVehicles[5] || vehicleid == TirVehicles[6] || vehicleid == TirVehicles[7] || vehicleid == TirVehicles[8] || vehicleid == TirVehicles[9] || vehicleid == TirVehicles[10] || vehicleid == TirVehicles[11])
        {
            if(
PlayerInfo[playerid][pJob] == 22 || PlayerInfo[playerid][pJob2] == 22)
            {
            }
            else
            {
                
RemovePlayerFromVehicle(playerid);
                new 
Float:slxFloat:slyFloat:slz;
                
GetPlayerPos(playeridslxslyslz);
                
SetPlayerPos(playeridslxslyslz);
                
defer NOPCheck(playerid);
                
SendClientMessage(playeridCOLOR_GRAD2"Tir şofцrь değilsin.");
            }
        }
        else if(
vehicleid == LSFMDVehicles[13] || vehicleid == LSFMDVehicles[16] || vehicleid == LSFMDVehicles[36] || vehicleid == LSFMDVehicles[37] || vehicleid == LSFMDVehicles[38] || vehicleid == LSFMDVehicles[39] || vehicleid == LSFMDVehicles[40])
        {
            if(
PlayerInfo[playerid][pLeader] == || PlayerInfo[playerid][pFaction] == && PlayerInfo[playerid][pDivision] == 2)
            {
            }
            else
            {
                
RemovePlayerFromVehicle(playerid);
                new 
Float:slxFloat:slyFloat:slz;
                
GetPlayerPos(playeridslxslyslz);
                
SetPlayerPos(playeridslxslyslz);
                
defer NOPCheck(playerid);
                
SendClientMessage(playeridCOLOR_GRAD2"Hayat uзuşu biriminde değilsin.");
            }
        }
        else if(
IsANewsVeh(vehicleid))
        {
            if(
PlayerInfo[playerid][pFaction] == 9||PlayerInfo[playerid][pLeader] == 9)
            {
                if(
GetVehicleModel(vehicleid) == 488 && PlayerInfo[playerid][pRank] < 3)
                {
                    
RemovePlayerFromVehicle(playerid);
                    new 
Float:slxFloat:slyFloat:slz;
                    
GetPlayerPos(playeridslxslyslz);
                    
SetPlayerPos(playeridslxslyslz);
                    
defer NOPCheck(playerid);
                    
SendClientMessage(playeridCOLOR_GRAD2"Bu helikopteri uзurabilmek iзin en az R3 olman gerek.");
                }
            }
            else
            {
                
RemovePlayerFromVehicle(playerid);
                new 
Float:slxFloat:slyFloat:slz;
                
GetPlayerPos(playeridslxslyslz);
                
SetPlayerPos(playeridslxslyslz);
                
defer NOPCheck(playerid);
                
SendClientMessage(playeridCOLOR_GRAD2"San Andreas Haberleri oluşumunda değilsin!");
            }
        }
        else if(
IsAGovCar(vehicleid))
        {
            if(
PlayerInfo[playerid][pFaction] == 5||PlayerInfo[playerid][pLeader] == 5)
            {
            }
            else
            {
                
RemovePlayerFromVehicle(playerid);
                new 
Float:slxFloat:slyFloat:slz;
                
GetPlayerPos(playeridslxslyslz);
                
SetPlayerPos(playeridslxslyslz);
                
defer NOPCheck(playerid);
                
SendClientMessage(playeridCOLOR_GRAD2"GOV'dan değilsin.");
            }
        }
        else if(
IsAPlane(vehicleid))
        {
            if(
PlayerInfo[playerid][pFlyLic] != 1)
            {
                
RemovePlayerFromVehicle(playerid);
                new 
Float:slxFloat:slyFloat:slz;
                
GetPlayerPos(playeridslxslyslz);
                
SetPlayerPos(playeridslxslyslz);
                
defer NOPCheck(playerid);
                
SendClientMessage(playerid,COLOR_GREY,"Pilot belgen yok!");
            }
        }
        else if(
IsAHelicopter(vehicleid))
        {
            
PlayerInfo[playerid][pAGuns][GetWeaponSlot(46)] = 46;
            
GivePlayerValidWeapon(playerid4660000);
        }
        else if(
IsAnTaxi(vehicleid) || IsAnBus(vehicleid))
        {
            if(
PlayerInfo[playerid][pJob] == 17 || PlayerInfo[playerid][pJob2] == 17)
            {
            }
            else
            {
                
SendClientMessage(playerid,COLOR_GREY,"Taksici yada otobьs şofцrь değilsin!");
                
RemovePlayerFromVehicle(playerid);
                new 
Float:slxFloat:slyFloat:slz;
                
GetPlayerPos(playeridslxslyslz);
                
SetPlayerPos(playeridslxslyslz);
            }
        }
    }
    if(
newstate == PLAYER_STATE_SPAWNED)
    {
        
TelePos[playerid][0] = 0.0;
        
TelePos[playerid][1] = 0.0;
        
//gPlayerSpawned[playerid] = 1;
    
}
    return 
1;

Reply
#2

Post the full error log that contains the backtrace info to get help.
Reply
#3

what is the last thing you`ve added that is causing this error?
Reply
#4

Please post just codes on OnPlayerStateChange under u check newstate == PLAYER_STATE_ONFOOT or newstate == 1.

Then, post how u define the vars that u use in ur code.
Reply
#5

More info, as iKarim said... If you're going to post info, then don't just post half of it.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)