Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- addEventHandler("onPlayerVehicleExit", getRootElement(), function(veh,seat,jacker)
- if seat == 0 then
- --local theVehicle = getPedOccupiedVehicle(thePlayer)
- if getElementData(veh, "private_car") == true then
- local x, y, z = getElementPosition(veh)
- local rx, ry, rz = getElementRotation(veh)
- local healthv = getElementHealth(veh)
- local panelv = getVehiclePanels(veh)
- local doorv = getVehicleDoors(veh)
- local lightv = getVehicleLights(veh)
- local r,g,b,a,r2,g2,b2,a2,r3,g3,b3,a3,r4,g4,b4,a4 = getVehicleColor(veh, true)
- local colorv = toJSON({r=r,g=g,b=b,a=a,r2=r2,g2=g2,b2=b2,a2=a2,r3=r3,g3=g3,b3=b3,a3=a3,r4=r4,g4=g4,b4=b4,a4=a4})
- local rh, gh, bh = getVehicleHeadLightColor(veh)
- local colorheadlightv = toJSON({r=rh, g=gh, b=bh})
- local w1 = getVehicleEngineState(veh)
- local w2 = isElementFrozen(veh)
- local w3 = getVehicleOverrideLights(veh)
- local statuscarv = ""..w1..","..w2..","..w3..""
- for i,v in ipairs(getElementsByType("player")) do outputChatBox(statuscarv,v) end
- dbExec(dbsuccess, "UPDATE future_vehicle SET x = ?, y = ?, z = ?, rx = ?, ry = ?, rz = ?, health = ?, panels = ?, doors = ?, lights = ?, color = ?, headlightcolor = ?, vehstatus = ? WHERE id = ?", x, y, z, rx, ry, rz, healthv, panelv, doorv, lightv, colorv, colorheadlightv, result, getElementData(source, "vehicle:id"))
- cancelEvent()
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement