Please, help me. Lua to Asi.
and can you compile this for me?
Lua:
script_description("drift nitro for cars [left alt]")
local mem = require "memory"
local sampev = require 'lib.samp.events'
local unhp = 1000
function main()
if not isSampfuncsLoaded() or not isSampLoaded() then return end
while not isSampAvailable() do wait(100) end
sampRegisterChatCommand("st", nrs)
sampRegisterChatCommand("sw", nre)
while true do
wait(0)
if isCharInAnyCar(playerPed) then
local myCar = storeCarCharIsInNoSave(playerPed)
local iAm = getDriverOfCar(myCar)
if iAm == playerPed then
if isKeyDown(18) then
giveNonPlayerCarNitro(myCar)
while isKeyDown(18) 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
function nrs()
if not isCharInAnyCar(PLAYER_PED) then
return true;
end
local car = storeCarCharIsInNoSave(PLAYER_PED)
local health = getCarHealth(car)
lua_thread.create(function()
for i = health, 300, -100 do
wait(100); setCarHealth(car, i)
end
end)
end
function nre()
car = storeCarCharIsInNoSave(playerPed)
lua_thread.create(function()
setCarHealth(car, unhp)
wait(300)
goKeyPressed(13)
wait(100)
setCarHealth(car, unhp)
wait(300)
goKeyPressed(13)
end)
end
function goKeyPressed(keyID)
lua_thread.create(function()
setVirtualKeyDown(13,true)
wait(100)
setVirtualKeyDown(13,false)
end)
end
function perevorot()
while true do wait(0)
if isCharInAnyCar(PLAYER_PED) and not sampIsChatInputActive() and not sampIsDialogActive() and not sampIsCursorActive() then
if isKeyDown(VK_DELETE) then
addToCarRotationVelocity(storeCarCharIsInNoSave(PLAYER_PED), 0.0, -0.15, 0.0)
elseif isKeyDown(VK_END) then
addToCarRotationVelocity(storeCarCharIsInNoSave(PLAYER_PED), 0.0, 0.15, 0.0)
end
end
end
end
and can you compile this for me?