Jump to content

help with script make


Recommended Posts

addCommandHandler("scp", -- short for 'set component position'
    function()
        local theVeh = getPedOccupiedVehicle(localPlayer)
    local getComponent = door_lr_dummy (theVeh) -- returns table with all the components of the vehicle
        if (theVeh) then
            for k in pairs (getComponent) do
        local x, y, z = getVehicleComponentPosition(theVeh, k) --get the position of the component
                setVehicleComponentPosition(theVeh, k, x+1, y+1, z+1) -- increases by 1 unit
            end
        end
    end
)

 

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...