script_name("driftNitro")
script_description("drift nitro for cars [left ctrl]")
script_version_number(1)
script_version("v.001")
script_authors("hnnssy", "legend2360")
local mem = require "memory"
function main()
if not isSampfuncsLoaded() or not isSampLoaded() then return end
while not isSampAvailable() do wait(100) end
while true do
wait(0)
if isCharInAnyCar(playerPed) then
local myCar = storeCarCharIsInNoSave(playerPed)
local iAm = getDriverOfCar(myCar)
if iAm == playerPed then
if isKeyDown(16) then
giveNonPlayerCarNitro(myCar)
while isKeyDown(16) and not sampIsChatInputActive() do
wait(0)
mem.setfloat(getCarPointer(myCar) + 0x08A4, -0.5)
end
removeVehicleMod(myCar, 1008)
removeVehicleMod(myCar, 1009)
removeVehicleMod(myCar, 1010)
end
else
while isCharInAnyCar(playerPed) do
wait(0)
end
end
end
end
end