kiboka Posted November 6, 2018 Share Posted November 6, 2018 Hi, I need help, because i dont know how can i make an object visible while It’s on a forklift in an interior. Link to comment
Dimos7 Posted November 6, 2018 Share Posted November 6, 2018 Show us your code to help you Link to comment
kiboka Posted November 6, 2018 Author Share Posted November 6, 2018 function forklift.serverAttachBox(player) local veh = getPedOccupiedVehicle(player) if isElement(veh) then if isElement(attachedBox[veh]) then return end attachedBox[veh] = createObject(boxID, 0, 0, 0) attachElements(attachedBox[veh], veh, 0, 1.4, -0.05) end end addEvent("serverAttachBox", true) addEventHandler("serverAttachBox", root, forklift.serverAttachBox) Link to comment
Dimos7 Posted November 6, 2018 Share Posted November 6, 2018 Well go to your resource where change the interior and put that getAttachedElements and make them so when change interior them change as loop Link to comment
kiboka Posted November 6, 2018 Author Share Posted November 6, 2018 if veh then setElementInterior(veh, 1) setElementDimension(veh, getElementData(hitElement, "dbid") + 1000) setElementPosition(veh, -2052.6340332031, 157.98210144043, 28.842931747437) triggerServerEvent("serverAttachBox", localPlayer, localPlayer) end Pls help Link to comment
Dimos7 Posted November 6, 2018 Share Posted November 6, 2018 if veh then for i, v in ipairs(getAttachedElements(veh)) do setElementInterior(v, 1) setElementInterior(veh, 1) setElementDimension(veh, getElementData(hitElement, "dbid") + 1000) setElementPosition(veh, -2052.6340332031, 157.98210144043, 28.842931747437) triggerServerEvent("serverAttachBox", localPlayer, localPlayer) end end Try this Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now