Hey, I’m trying to find some way to cancel player from enter vehicle while variable is true.
Do you guys know any way to do that?
I tried to send to the server the Boolean and use baseevents to check if the player is entering vehicle and tried to use CancelEvent() but it still let the player enter the vehicle so maybe some got a better way
If I remember correctly, CancelEvent() only works on game events and not events triggered by other resources like baseevents.
You can try
ClearPedTasksImmediately()
This clears all the tasks a ped is doing, and should also cancel the entering of a vehicle.
There might better ways to do this, but this came to my mind first.
Thanks mate!