Jump to content

[Help] MTA Paradise Interior System


Killer...

Recommended Posts

Hello everyone, i write this post because i need help whit the interior system of MTA Paradise, the problem it's that the vehicles when enter's in an interior get's the engine damaged. Here's the script.

if isPedInVehicle ( player ) and getPedOccupiedVehicleSeat( player ) == 0 then 
  vehicle = getPedOccupiedVehicle ( player ) 
  setVehicleFrozen ( vehicle, true ) 
  setVehicleDamageProof( vehicle, false ) 
  setElementCollisionsEnabled( vehicle, false) 
  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 
  setVehicleFrozen ( vehicle, true ) 
  setVehicleDamageProof( vehicle, true ) 
  setElementDimension( vehicle, getElementDimension( other ) ) 
  setElementInterior( vehicle, getElementInterior( other ) ) 
  setElementPosition( vehicle, getElementPosition( other ) ) 
  triggerEvent( "onColShapeHit", other, player, vehicle, true ) 
  setVehicleDamageProof( vehicle, false ) 
  setVehicleFrozen ( vehicle, false ) 
  setElementCollisionsEnabled( vehicle, true) 
    elseif isPedInVehicle ( player ) and not getPedOccupiedVehicleSeat( player ) == 0 then 
  setVehicleFrozen ( vehicle, true ) 
  setVehicleDamageProof( vehicle, true ) 
  setElementCollisionsEnabled( vehicle, false) 
  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, vehicle, true ) 
  setVehicleFrozen ( vehicle, false ) 
  setVehicleDamageProof( vehicle, true ) 
  setElementCollisionsEnabled( vehicle, 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, vehicle, true ) 
    end 
   end 
  end 
 end 
end 

Please help, and thanks for watch.

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