Jump to content

Cancel entering vehicle server-side


dascan58

Recommended Posts

Im trying to do a license check, and freeze the player when it's try to enter a vehicle.

But I don't know how i can cancel the event.

export const playerStartEnterVehicle = (player: PlayerMp, vehicle: VehicleMp, seat: number, cancel: boolean) => {
    
    return true;
};

return true; is not working

 

Link to comment
Share on other sites

Maybe use the «PlayerStartEnterVehicle» event and check for a player variable, if it returns false use the vehicle.locked function for only that player

On the wiki the C# client-side implementation has cancel as an argument. I would recommend looking into that.

Edited by voltpowered
Link to comment
Share on other sites

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