Dio skripte:
CMD:gulaz(playerid, params[]) {
new id = GetNearestGarage(playerid);
if(id == -1) return Error(playerid, "Nema garaze u blizini.");
new gtype = GarazaInfo;
if(GarazaInfo == true) return Error(playerid, "Ova garaza je zakljucana.");
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) {
JBC_SetPlayerPos(playerid, GarageInteriors, GarageInteriors, GarageInteriors);
UsaoInt = 1;
GameTextForPlayer(playerid, "~g~Ucitavanje objekata", 2500, 4);
SetTimerEx("UnfreezemeMacko", 2000, false, "i", playerid);
TogglePlayerControllable(playerid, false);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid, floatround(GarageInteriors));
SetPlayerVirtualWorld(playerid, GarazaInfo);
SetPlayerFacingAngle(playerid, GarageInteriors);
EnteredGarage = id;
SendInfoMessage(playerid, "Da izadjete iz garaze kucajte /gizlaz.");
}
else if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) {
new vehicle = GetPlayerVehicleID(playerid);
LinkVehicleToInterior(vehicle, floatround(GarageInteriors));
SetVehicleVirtualWorld(vehicle, GarazaInfo);
JBC_SetVehiclePos(vehicle, GarageInteriors, GarageInteriors, GarageInteriors);
UsaoInt = 1;
GameTextForPlayer(playerid, "~g~Ucitavanje objekata", 2500, 4);
SetTimerEx("UnfreezemeMacko", 2000, false, "i", playerid);
TogglePlayerControllable(playerid, false);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid, floatround(GarageInteriors));
SetPlayerVirtualWorld(playerid, GarazaInfo);
SetVehicleZAngle(vehicle, GarageInteriors);
EnteredGarage = id;
SendInfoMessage(playerid, "Da izadjete iz garaze kucajte /gizlaz.");
}
else return Error(playerid, "Komandu mozes koristiti samo ako si na nogama ili na vozacevom mestu.");
return true;
}Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log):
[00:32:06] AMX backtrace:
[00:32:06] #0 0068f00c in public cmd_gulaz (0, 37437368) from JMRP.amx
[00:32:06] #1 native CallLocalFunction () from samp-server.exe
[00:32:06] #2 00002740 in public OnPlayerCommandText (0, 37437340) from JMRP.amx
[00:32:07] Run time error 4: "Array index out of bounds"
[00:32:07] Attempted to read/write array element at index 3 in array of size 3Slika/video ingame problema(obavezno ako je ingame problem): link slike