botshara Posted November 28, 2013 Share Posted November 28, 2013 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 comment
Woovie Posted November 29, 2013 Share Posted November 29, 2013 I will test this a bit in MTA and see if I can figure out what is causing the damage using a debug function. 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