Quote:
Originally Posted by VeggieBoy
Isn't it taking their location then adding a positive or negative valuable to it?
|
Yes in a sort, but I need to be able to calculate the specific position in which would be left or right, forward or back, depending on the angle they are facing.
Quote:
Originally Posted by Pottus
https://sampforum.blast.hk/showthread.php?tid=325872
Now you would need to modify that slightly to do what you want example.
pawn Код:
stock Float:GetPosInFrontOfPlayer(playerid, Float:distance, Float:aoffset, &Float:x, &Float:y) { new Float:a; GetPlayerPos(playerid, x, y, a); a += aoffset; switch(IsPlayerInAnyVehicle(playerid)) { case 0: GetPlayerFacingAngle(playerid, a); case 1: GetVehicleZAngle(GetPlayerVehicleID(playerid), a); } x += (distance * floatsin(-a, degrees)); y += (distance * floatcos(-a, degrees)); }
|
This will work for forward and backwards, however I have no clue how I will be able to get it working for left or right.