20.02.2013, 21:16
(
Последний раз редактировалось rbN.; 21.02.2013 в 08:00.
)
Why not create an invisible object on the vehicle, where the player can stand on. If he doesn't stand on it then teleport him back..
(explanation asked):
What the include does is SetPlayerPos on a timer, but why don't you use AttachObjectToVehicle to create an invisible object using SetObjectMaterial. With that method you can just use a check if the player is on the invisible object. If he's not, use SetPlayerPos. This way it's a lot more efficienter, doesn't require a lot of SetPlayerPos'es, and would 'smooth' out the whole attaching (as it's pretty much done by the client)..
(explanation asked):
What the include does is SetPlayerPos on a timer, but why don't you use AttachObjectToVehicle to create an invisible object using SetObjectMaterial. With that method you can just use a check if the player is on the invisible object. If he's not, use SetPlayerPos. This way it's a lot more efficienter, doesn't require a lot of SetPlayerPos'es, and would 'smooth' out the whole attaching (as it's pretty much done by the client)..