SA-MP Forums Archive
GetPosRightPlayer - 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)
+--- Thread: GetPosRightPlayer (/showthread.php?tid=440916)



Get pos to the right in point of player ? - HitnKill - 31.05.2013

Hi, i want to change the position to the right at the point of player .
I tried many computing changing the function GetXYInFrontOfPlayer or Behind but doesnt works.


Get pos to the right in point of player ? - HitnKill - 01.06.2013

Up please.


Respuesta: GetPosRightPlayer - JustBored - 01.06.2013

Maybe this?
pawn Код:
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
SetPlayerPos(playerid,x,y+5,z); //i think that Y is right otherwise plz correct me.



Re : GetPosRightPlayer - HitnKill - 01.06.2013

Hi thanks you for your answer but I'd like to change positions with the angle of the player such as this function


Re: Respuesta: GetPosRightPlayer - Emmet_ - 01.06.2013

Quote:
Originally Posted by JustBored
Посмотреть сообщение
Maybe this?
pawn Код:
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
SetPlayerPos(playerid,x,y+5,z); //i think that Y is right otherwise plz correct me.
That won't work. The y value changes according to the facing angle.


Re : GetPosRightPlayer - HitnKill - 01.06.2013

Exactly, i can't do it after all my tests, if someone can help me


Re: GetPosRightPlayer - FUNExtreme - 01.06.2013

Add 90 to the angle in tje GetXYInFrontOfPlayer function. It calculates the position in front of the player. So if you want the position on the right you just have to trick the function into thinking the player is facing that direction


Re : GetPosRightPlayer - HitnKill - 01.06.2013

Thanks he works it was enough to change the angle