- Katılım
- 3 yıl 11 ay
- Mesajlar
- 112
- Discord
- nobodyalp
Paketimdeki carmenüye alttaki kodu ekliyorum ama yinede olmuyor çözümünü bilen varsa yardımcı olabilirmi?
RegisterNUICallback('toggleengine', function(data, cb)
player = PlayerPedId()
veh = GetVehiclePedIsIn(player, false)
if veh ~= 0 then
ESX.TriggerServerCallback("tq-vehiclekey:server:checkKey", function(result)
for i=1, #result, 1 do
if result.info.plaka == GetVehicleNumberPlateText(veh) then
local engine = not GetIsVehicleEngineRunning(veh)
if not IsPedInAnyHeli(player) then
SetVehicleEngineOn(veh, engine, false, true)
SetVehicleJetEngineOn(veh, engine)
else
if engine then
SetVehicleFuelLevel(veh, vehicle_fuel)
else
SetVehicleFuelLevel(veh, 0)
end
end
end
end
end)
end
cb('ok')
end)
CARMENU scriptindeki default kod
RegisterNUICallback('toggleengine', function(data, cb)
player = GetPlayerPed(-1)
veh = GetVehiclePedIsIn(player, false)
if veh ~= 0 then
local engine = not GetIsVehicleEngineRunning(veh)
if not IsPedInAnyHeli(player) then
SetVehicleEngineOn(veh, engine, false, true)
SetVehicleJetEngineOn(veh, engine)
else
if engine then
SetVehicleFuelLevel(veh, vehicle_fuel)
else
SetVehicleFuelLevel(veh, 0)
end
end
end
cb('ok')
end)
RegisterNUICallback('toggleengine', function(data, cb)
player = PlayerPedId()
veh = GetVehiclePedIsIn(player, false)
if veh ~= 0 then
ESX.TriggerServerCallback("tq-vehiclekey:server:checkKey", function(result)
for i=1, #result, 1 do
if result.info.plaka == GetVehicleNumberPlateText(veh) then
local engine = not GetIsVehicleEngineRunning(veh)
if not IsPedInAnyHeli(player) then
SetVehicleEngineOn(veh, engine, false, true)
SetVehicleJetEngineOn(veh, engine)
else
if engine then
SetVehicleFuelLevel(veh, vehicle_fuel)
else
SetVehicleFuelLevel(veh, 0)
end
end
end
end
end)
end
cb('ok')
end)
CARMENU scriptindeki default kod
RegisterNUICallback('toggleengine', function(data, cb)
player = GetPlayerPed(-1)
veh = GetVehiclePedIsIn(player, false)
if veh ~= 0 then
local engine = not GetIsVehicleEngineRunning(veh)
if not IsPedInAnyHeli(player) then
SetVehicleEngineOn(veh, engine, false, true)
SetVehicleJetEngineOn(veh, engine)
else
if engine then
SetVehicleFuelLevel(veh, vehicle_fuel)
else
SetVehicleFuelLevel(veh, 0)
end
end
end
cb('ok')
end)