Posts: 101
Threads: 22
Joined: Feb 2014
Reputation:
0
Hello, I want to disable car moving and pushing.
I want all the cars can move only if you are in the car as driver and you are driving the car.
Any ideas how that's possible?
Posts: 101
Threads: 22
Joined: Feb 2014
Reputation:
0
Any example code for my case with OnUnoccupiedVehicleUpdate?
Posts: 101
Threads: 22
Joined: Feb 2014
Reputation:
0
How can I save the vehicle position when a player exits it into a global array?
For the second point I could not understand what you mean exactly.
I apologize for the stupid questions, but I'm still a beginner in PAWN scripting.
The syntax is still difficult for me.
Posts: 2,698
Threads: 37
Joined: Mar 2012
Reputation:
0
This callback is called VERY frequently, I suggest you to return 0 so that it won't be synchronized to anyone else in case if a player is trying to push it. But that would become hassle if other cars hit them and they were supposed to move, or in cases like an explosion.
I see no way to avoid players pushing the vehicle efficiently on SA-MP right now, other than increasing it's mass (client modification will be required). But since the main post asks that vehicle shouldn't be moved unless it has got a driver, it's better to use "return 0" under OnUnoccupiedVehicleUpdate callback.