stock Jammer_Info(playerid) { for(new i = 0; i <= MAX_DYNAMIC_CARS; i++) if(CJData[i][cjinfo]) { new Float:x, Float:y, Float:z; x = CJData[i][cjx]; y = CJData[i][cjy]; z = CJData[i][cjz]; new Float:x2, Float:y2, Float:z2; new houseid = PlayerData[playerid][pHouse]; new bizid = PlayerData[playerid][pBusiness]; new eid = PlayerData[playerid][pEntrance]; x2 = HouseData[houseid][housePos][0]; y2 = HouseData[houseid][housePos][1]; z2 = HouseData[houseid][housePos][2]; if(GetPlayerInterior(playerid) == 0) { if(IsPlayerInRangeOfPoint(playerid, 60.0, x, y, z)) { return SendErrorMessage(playerid, "Bu bцlgedeki sinyaller kesilmiş!"); } } else { if(House_Inside(playerid) != -1) { if(IsPointInRangeOfPoint(x, y, z, x2, y2, z2, 60.0)) { return SendErrorMessage(playerid, "Bu bцlgedeki sinyaller kesilmiş!"); } } x2 = BusinessData[bizid][bizPos][0]; y2 = BusinessData[bizid][bizPos][1]; z2 = BusinessData[bizid][bizPos][2]; if(Business_Inside(playerid) != -1) { if(IsPointInRangeOfPoint(x, y, z, x2, y2, z2, 60.0)) { return SendErrorMessage(playerid, "Bu bцlgedeki sinyaller kesilmiş!"); } } x2 = EntranceData[eid][entrancePos][0]; y2 = EntranceData[eid][entrancePos][1]; z2 = EntranceData[eid][entrancePos][2]; if(Entrance_Inside(playerid) != -1) { if(IsPointInRangeOfPoint(x, y, z, x2, y2, z2, 60.0)) { return SendErrorMessage(playerid, "Bu bцlgedeki sinyaller kesilmiş!"); } } } } return -1; }
CMD:testing(playerid, params[]) { if(Jammer_Info(playerid) == -1) { SendClientMessage(playerid, -1, "Testing.."); } return 1; }
https://sampforum.blast.hk/showthread.php?tid=262796
Get the CrashDetect plugin and restart your server. Type the command and check your server_log.txt for the debug. Post it back here in [PHP] code. Also, why are you looping everything other than the vehicles in MAX_DYNAMIC_CAR? |
[19/07/2017 20:31:59] [debug] Run time error 4: "Array index out of bounds" [19/07/2017 20:31:59] [debug] Attempted to read/write array element at negative index -1 [19/07/2017 20:31:59] [debug] AMX backtrace: [19/07/2017 20:31:59] [debug] #0 002606a4 in ?? (0) from qwer.amx [19/07/2017 20:31:59] [debug] #1 00260cc0 in public cmd_ara (0, 82153744) from qwer.amx [19/07/2017 20:31:59] [debug] #2 native CallLocalFunction () from samp-server.exe [19/07/2017 20:31:59] [debug] #3 0002b6b8 in public OnPlayerCommandText (0, 82153724) from qwer.amx
Type the command and check your server_log.txt for the debug. Post it back here in [PHP] code. |