Skip to content
This repository has been archived by the owner on Dec 18, 2018. It is now read-only.

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
TomGrobbe committed Dec 11, 2017
1 parent 486e4aa commit ea494bb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions vengine/__resource.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5'
client_script 'cl_vengine.lua'
12 changes: 12 additions & 0 deletions vengine/cl_vengine.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
if IsControlJustReleased(0, 167) then
if GetVehiclePedIsIn(GetPlayerPed(-1), false) ~= nil then
if GetPedInVehicleSeat(GetVehiclePedIsIn(GetPlayerPed(-1), false)) < 1 then
SetVehicleEngineOn(GetVehiclePedIsIn(GetPlayerPed(-1), false), (not IsVehicleEngineOn(GetVehiclePedIsIn(GetPlayerPed(-1), false))), true, false)
end
end
end
end
end)

0 comments on commit ea494bb

Please sign in to comment.