--[[
AUtor: Direxus
PrzerĂłbka: vNex
]]
local car_fly = false
function fly()
local vehicle = getPedOccupiedVehicle(localPlayer)
if getElementModel(vehicle) == 517 then -- tu dajesz id auta
if car_fly == false then
setWorldSpecialPropertyEnabled("hovercars", true)
outputChatBox("* Uruchomiono tryb plywania (B).")
car_fly = true
elseif car_fly == true then
setWorldSpecialPropertyEnabled("hovercars", false)
outputChatBox("* Wy?‚?…czono tryb plywania (B).")
car_fly = false
end
end
end
addEventHandler("onClientResourceStart", getRootElement(), function()
bindKey("b", "down", fly) -- Tu masz bind
end)
function AANieMa()
if car_fly == true then
setWorldSpecialPropertyEnabled("hovercars", false)
end
end
addEventHandler("onClientVehicleExit", root, AANieMa)