GetXYBehindThePlayer
#1

I see this being used in a filterscript, GetXYBehindThePlayer, but when I use it gives me:
pawn Код:
error 017: undefined symbol "GetXYBehindThePlayer"
Can someone help me?
Reply
#2

Add this somewhere in your code:
pawn Код:
GetXYBehindPlayer(playerid, &Float:x, &Float:y, Float:distance)
{
    new Float:a;

    GetPlayerPos(playerid, x, y, a);
    GetPlayerFacingAngle(playerid, a);
    if (IsPlayerInAnyVehicle(playerid)) GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
    x -= (distance * floatsin(-a, degrees));
    y -= (distance * floatcos(-a, degrees));
}
Credit to dice7.
Reply
#3

And for InFrontOfPlayer? Sorry...
Reply
#4

https://sampwiki.blast.hk/wiki/Stock_Fun...ultiple_values
Here.
Reply
#5

I'm really bad at math so just give me the code please.


EDIT: NVM, fixed.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)