Hmm... Can you repair this too?
addEventHandler("onPlayerJoin",root,
function ()
bindKey(source,"z","down",fix)
end)
addEventHandler("onResourceStart",resourceRoot,
function ()
for index, player in ipairs(getElementsByType("player")) do
bindKey(player,"z","down",fix)
end
end)
function fix (playerSource)
local theVehicle = getPedOccupiedVehicle (playerSource)
if (theVehicle and getVehicleController ( theVehicle ) == playerSource) then
fixVehicle (theVehicle)
local rx, ry, rz = getVehicleRotation ( vehicle )
if ( rx > 110 ) and ( rx < 250 ) then
local x, y, z = getElementPosition ( vehicle )
setVehicleRotation ( vehicle, rx + 180, ry, rz )
setElementPosition ( vehicle, x, y, z + 2 )
end
end
addCommandHandler ("fix" , fix)
I want add flip to this function.