SA-MP Forums Archive
Moving an object infront of a player - 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: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Moving an object infront of a player (/showthread.php?tid=65289)



Moving an object infront of a player - SpiderPork - 11.02.2009

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.


Re: Moving an object infront of a player - SpiderPork - 11.02.2009

Help, please.


Re: Moving an object infront of a player - pspleo - 11.02.2009

GetXYInFrontOfPlayer


Re: Moving an object infront of a player - SpiderPork - 12.02.2009

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


Re: Moving an object infront of a player - Think - 12.02.2009

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


Re: Moving an object infront of a player - SpiderPork - 12.02.2009

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


Re: Moving an object infront of a player - Think - 12.02.2009

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


Re: Moving an object infront of a player - SpiderPork - 12.02.2009

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.


Re: Moving an object infront of a player - Think - 12.02.2009

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