SA-MP Forums Archive
[Include] APTV - Attach Player To Vehicle - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] APTV - Attach Player To Vehicle (/showthread.php?tid=416900)



APTV - No Timers / Proper Attaching ;) - S0n1COwnsYou - 18.02.2013




Re: APTV - Attach Player To Vehicle - MP2 - 18.02.2013

A player loop in a 100 MS timer? Whut.

Ever heard of OnPlayerUpdate?

Plus this isn't really proper attaching, it'll look bad (no offence, it's just how SA:MP is, what with no client-side scripting).


Re: APTV - Attach Player To Vehicle - TheArcher - 18.02.2013

Yes indeed as MP2 said, I was thinking about OnPlayerUpdate however, SetCameraBehindPlayer everytime is quite sick


Re: APTV - Attach Player To Vehicle - S0n1COwnsYou - 18.02.2013

Quote:
Originally Posted by MP2
Посмотреть сообщение
A player loop in a 100 MS timer? Whut.

Ever heard of OnPlayerUpdate?

Plus this isn't really proper attaching, it'll look bad (no offence, it's just how SA:MP is, what with no client-side scripting).
tried animation in the timer but fail, any suggestions ?


Re: APTV - Attach Player To Vehicle - TheArcher - 18.02.2013

Quote:
Originally Posted by S0n1COwnsYou
Посмотреть сообщение
tried animation in the timer but fail, any suggestions ?
That means that you are going to apply an animation to a player any 100ms?


Re: APTV - Attach Player To Vehicle - Rapgangsta - 18.02.2013

useALSory_hooksfags incoming


Re: APTV - Attach Player To Vehicle - TheArcher - 20.02.2013

Hook OnPlayerUpdate! u.u


Re: APTV - Attach Player To Vehicle - rbN. - 20.02.2013

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


Re: APTV - Attach Player To Vehicle - S0n1COwnsYou - 21.02.2013

Quote:
Originally Posted by RobinOwnz
Посмотреть сообщение
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)..
Great idea, updating