[SOLVED] Disable Player Exiting Vehicle
#1

Anybody know how to disable/disallow player exiting vehicle.

For example, i am making a seat belt system, and if the player still wearing seat belt, the player cannot get out from the vehicle until that player remove the seat belt.

Never mind about the seat belt system, cuz i already make it myself. But what i want is just to disable player exiting/get out from the vehicle. Anybody knows? Please help!
Reply
#2

This is a long shot, but try putting return 0; in OnPlayerExitVehicle IF the player still has thier seatbelt on

Otherwise just throw them back into the vehicle if they exit with a seatbelt on (PutPlayerInVehicle)
Reply
#3

Quote:
Originally Posted by XGh0stz
This is a long shot, but try putting return 0; in OnPlayerExitVehicle IF the player still has thier seatbelt on

Otherwise just throw them back into the vehicle if they exit with a seatbelt on (PutPlayerInVehicle)
I already tried using the PutPlayerInVehicle, but somehow it doesn't work
Reply
#4

Then use OnPlayerStateChange instead (OnFoot)
Reply
#5

I have arresting system in my server and if player is arrested he can't exit the cop car. I simply put "PutPlayerInVehicle" in OnPlayerExitVehicle and it vorks. Player can't exit vehicle, BUT other players can see him exiting and then returning to his seat. So PutPlayerInVehicle should work for you too.
Reply
#6

Alright, it's all solved! I found what i have to do, cuz i can't do PutPlayerInVehicle directly, so what i do is:

> Use GetPlayerPos to get the position of the player
> Use SetPlayerPos to place the position of the player into the GetPlayerPos value
> Use PutPlayerInVehicle

Done!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)