Can't get entity to dismount
seem to not be able to dismount the entity..

            public void npccarDismount(NPCPlayerApex entity, BaseCombatEntity car)
            {
               if (car is BaseVehicle)
               {
                 var car1 = car as BaseVehicle;
                 car1.AttemptDismount(entity.ToPlayer());
               }
          }​
aAlso tried Interface.CallHook("CanDismountEntity", entity, false);    with no go.
Ts3hosting
aAlso tried Interface.CallHook("CanDismountEntity", entity, false);    with no go.

All that would do is call that hook in other plugins manually, it wouldn't trigger a dismount and would only naturally be called when an entity is attempting to dismount.

What i ended up with.. is this ok?

 public void npccarDismount(NPCPlayerApex entity, BaseCombatEntity car) { if (car is BaseVehicle) { var car1 = car as BaseVehicle; if (entity.isMounted) { entity.ToPlayer().EnsureDismounted(); entity.SendNetworkUpdateImmediate(); Interface.CallHook("OnEntityDismounted", entity); UserMessage(player, "going for dismount"); } } }​


Merged post

One think i seem to be missing is setting his dismount point close to the car.. and not where he mounted

Merged post

Ya idn im looking threw this and 

 var car1 = car as BaseVehicle; car1.AttemptDismount(entity.ToPlayer());​

Should work but does not.

Merged post

Still seems to jump put and go to where he was standing befor he got in instead of next to car.
          internal void npccarDismount(NPCPlayerApex entity)
            {
                 entity.Dismount();
                 npcAi.targeVehicle = null;
                 npcAi.action = Act.Idle;
                 entity.SendNetworkUpdateImmediate();
                 
               }​