[Include] APTV - Attach Player To Vehicle
#1

Reply
#2

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).
Reply
#3

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

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 ?
Reply
#5

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?
Reply
#6

useALSory_hooksfags incoming
Reply
#7

Hook OnPlayerUpdate! u.u
Reply
#8

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)..
Reply
#9

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
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)