Jump to content

Vehicle domaging


botshara

Recommended Posts

Ohh, here me again and i cant understand why car damaging on dimension change

                if isPedInVehicle ( player ) and getPedOccupiedVehicleSeat( player ) == 0 then 
                vehicle = getPedOccupiedVehicle ( player ) 
                for i = 0, getVehicleMaxPassengers( vehicle ) do 
                local passag = getVehicleOccupant( vehicle, i ) 
                if passag then 
                setElementDimension( passag, getElementDimension( other ) ) 
                setElementInterior( passag, getElementInterior( other ) ) 
                setCameraInterior( passag, getElementInterior( other ) ) 
                setElementPosition( passag, getElementPosition( other ) ) 
                setCameraTarget( passag, passag ) 
                end 
                end 
                setElementDimension( vehicle, getElementDimension( other ) ) 
                setElementInterior( vehicle, getElementInterior( other ) ) 
                setElementPosition( vehicle, getElementPosition( other ) ) 
                triggerEvent( "onColShapeHit", other, player, true ) 
                elseif isPedInVehicle ( player ) and not getPedOccupiedVehicleSeat( player ) == 0 then 
                removePedFromVehicle( player ) 
                setElementDimension( player, getElementDimension( other ) ) 
                setElementInterior( player, getElementInterior( other ) ) 
                setCameraInterior( player, getElementInterior( other ) ) 
                setElementPosition( player, getElementPosition( other ) ) 
                setCameraTarget( player, player ) 
                triggerEvent( "onColShapeHit", other, player, true ) 
                else 
                setElementDimension( player, getElementDimension( other ) ) 
                setElementInterior( player, getElementInterior( other ) ) 
                setCameraInterior( player, getElementInterior( other ) ) 
                setElementPosition( player, getElementPosition( other ) ) 
                setCameraTarget( player, player ) 
                triggerEvent( "onColShapeHit", other, player, true ) 
                end 

Link to post

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...