Moving an object infront of a player
#1

Hello!

Is it possible to move an object in front of a player. Not attach to him... I mean, well I'm not good with explaining, so I'll make an example:
Player's angle is 180.0, when the player presses a button, the object moves some meters forward (in front of him). Same with other angles. Doesn't matter if the angle is 159, 285, 360, the object has to move a few meters forward, not away from him, but in front of him.
Is it possible? If yes, how?

Thanks in advance!

EDIT: Like the Norn's and Seif's football script. It moves the ball a few meters forward, in front of the player. But Seif's script is for sale, and Norn's football script's link is broken.
Reply
#2

Help, please.
Reply
#3

GetXYInFrontOfPlayer
Reply
#4

How funny, that's not a valid function.
I heard something about cos() and sin()... Anyone knows anything about them?
Reply
#5

Quote:
Originally Posted by SpiderPork
How funny, that's not a valid function.
I heard something about cos() and sin()... Anyone knows anything about them?
you should check the forums by looking for that specific function lol
Reply
#6

I did, I used the holy search button, but I only get one result, and that's not the right one.
Reply
#7

Quote:
Originally Posted by SpiderPork
I did, I used the holy search button, but I only get one result, and that's not the right one.
try to search the whole forum and not only this post

http://forum.sa-mp.com/index.php?top...9696#msg479696
Reply
#8

Quote:
Originally Posted by Pandabeer1337
Quote:
Originally Posted by SpiderPork
I did, I used the holy search button, but I only get one result, and that's not the right one.
try to search the whole forum and not only this post
I did search, hehe. But didn't see this include. I'll try it, I'll tell you the result later.

EDIT: Hmmm, I put it in the script, but now I get errors from other lines. I'll fix them by myself . Thanks for your help.
Reply
#9

Quote:
Originally Posted by SpiderPork
Quote:
Originally Posted by Pandabeer1337
Quote:
Originally Posted by SpiderPork
I did, I used the holy search button, but I only get one result, and that's not the right one.
try to search the whole forum and not only this post
I did search, hehe. But didn't see this include. I'll try it, I'll tell you the result later.

EDIT: Hmmm, I put it in the script, but now I get errors from other lines. I'll fix them by myself . Thanks for your help.
glad i could help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)