Need a maths formula.
#1

I wanna make it so I can move a player a certain distance towards another player. So I'm using SetPlayerPos for this. Anybody know a maths formula to do this? Or any other method?
Reply
#2

Hmm, what you mean ? Like teleporting, but you don't want to teleport yourself or ?

Maybe like this

Код:
new otherplayerid;
new Float:X, Float:Y, Float:Z;
GetPlayerPos(otherplayerid, x, y, z);
SetPlayerPos(playerid, x+5, y, z);
This teleports you to otherplayer.
Reply
#3

Nah I don't want to teleport to the player. It just want to set you closer to the player. Like as if you were running towards him. I'm using the SetPlayerPos on an NPC. And I'm gonna be using a run animation on the NPC. So it will look like he's running towards the player.
Reply
#4

Quote:
Originally Posted by Celson
Nah I don't want to teleport to the player. It just want to set you closer to the player. Like as if you were running towards him. I'm using the SetPlayerPos on an NPC. And I'm gonna be using a run animation on the NPC. So it will look like he's running towards the player.
In my signature there is a Zombie Filterscript.. take a look at it, you will find what you need =D
Reply
#5

Quote:
Originally Posted by wafffllesss
Quote:
Originally Posted by Celson
Nah I don't want to teleport to the player. It just want to set you closer to the player. Like as if you were running towards him. I'm using the SetPlayerPos on an NPC. And I'm gonna be using a run animation on the NPC. So it will look like he's running towards the player.
In my signature there is a Zombie Filterscript.. take a look at it, you will find what you need =D
Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)