GetPosRightPlayer
#1

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.
Reply
#2

Up please.
Reply
#3

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.
Reply
#4

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

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

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

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
Reply
#8

Thanks he works it was enough to change the angle
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)