#6

[16:36:16] [debug] Run time error 4: "Array index out of bounds"
[16:36:16] [debug] Accessing element at negative index -22
[16:36:16] [debug] AMX backtrace:
[16:36:16] [debug] #0 00044898 in public OnPlayerWeaponShot (18, 0, 1, 13, 1047715840, 1053569024, 1046319104) from cnr.amx
PHP код:
public OnPlayerWeaponShot(playeridweaponidhittypehitidFloat:fXFloat:fYFloat:fZ)
{
    if(
hittype == BULLET_HIT_TYPE_PLAYER)
    {
        if(!
IsPlayerConnected(hitid))
            return 
1;
        if(
IsPlayerLeo(playerid))
        {
            if(!
pData[playerid][Event])
            {
                if(
IsPlayerLeo(hitid))
                    return 
GameTextForPlayer(playerid"Don't shoot your teammates"30003), 0;
                if(!
GetPlayerWantedLevel(hitid))
                    return 
GameTextForPlayer(playerid"Don't shoot innocent player"30003), 0;
            }
        }
    }
    if(
hittype == BULLET_HIT_TYPE_VEHICLE)
    {
        if(
IsPlayerLeo(playerid))
        {
            foreach(new 
Player)
            {
                if(
IsPlayerInVehicle(ihitid) && != playerid && IsPlayerLeo(i) && !GetPlayerVehicleSeat(i))
                    return 
GameTextForPlayer(playerid"Don't shoot your teammates vehicle"30003), 0;
            }
        }
        else
        {
            foreach(new 
Player)
            {
                if(
IsPlayerInVehicle(ihitid) && != playerid && IsPlayerLeo(i) && !GetPlayerVehicleSeat(i))
                {
                    
pData[playerid][PoliceCarShot]++;
                    if(
pData[playerid][PoliceCarShot] == 5)
                        
UpdatePlayerWantedLevel(playerid6);
                    break;
                }
            }
        }
    }
    return 
1;

Reply


Messages In This Thread
help - by sams90 - 22.04.2017, 08:12
Re: help - by Jstylezzz - 22.04.2017, 08:14
Re: help - by sams90 - 22.04.2017, 08:26
Re: help - by Vince - 22.04.2017, 08:31
Re: help - by sams90 - 22.04.2017, 08:54
Re: help - by sams90 - 22.04.2017, 09:00

Forum Jump:


Users browsing this thread: 1 Guest(s)