Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local cFunc = {}
- local cSetting = {}
- -- FUNCTIONS --
- cSetting["allowed"] = {
- [606] = true,
- }
- cFunc["checkTrailer"] = function()
- if(isPedInVehicle(localPlayer) == false) then
- local x, y, z = getElementPosition(localPlayer)
- local col = createColSphere(x, y, z, 10)
- setTimer(function()
- for index, car in pairs(getElementsWithinColShape(col)) do
- if(cSetting["allowed"][getElementModel(car)] == true) then
- triggerServerEvent("doTrailerEinsteigen", localPlayer, car)
- destroyElement(col)
- break;
- end
- end
- if(isElement(col)) then
- destroyElement(col)
- end
- end, 50, 1)
- end
- end
- bindKey("enter_exit", "down", cFunc["checkTrailer"])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement