1. Hello, I'm working on a plugin and I need to teleport all players to a certain area when I run a command. I'm able to do this to players on foot, but players who are in vehicles aren't being teleported.

    I know how to check if they are in a vehicle, but I'm not sure how to force them out.

    Code:
    if (pl.session.WorldPlayerEntity.GetComponent<PlayerStatManager>().Motor.InsideVehicle != null)
    {
         
    }
    
    Anyone have any suggestions?
    [DOUBLEPOST=1458522422][/DOUBLEPOST]For now I'm just killing the player and then I'm able to send them where I want them to go, but it's not the best solution.


    Code:
    if (pl.Value.WorldPlayerEntity.GetComponent<PlayerStatManager>().Motor.InsideVehicle != null)
                    {
                        EntityStats stats = pl.Value.WorldPlayerEntity.GetComponent<EntityStats>();
                        stats.GetFluidEffect(EEntityFluidEffectType.Health).SetValue(0F);
                    }
     
  2. Have a look at CharacterMotorSimple.SimulateVehicle() : 222 to see how we do it.