SA-MP Forums Archive
GetXYInFrontOfPlayer error - 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: GetXYInFrontOfPlayer error (/showthread.php?tid=90270)



GetXYInFrontOfPlayer error - AleksandarAdzic - 07.08.2009

Hello people, can someone help me how to fix this error?

error 017: undefined symbol "GetXYInFrontOfPlayer"

GetXYInFrontOfPlayer(playerid, x, y, VEHI_DIS);

PS: I already defined VEHI_DIS point, but i just cant do the definiton for getxyinfrontofplayer.

Do that needs some definition or include, please help


Re: GetXYInFrontOfPlayer error - kc - 07.08.2009

pawn Код:
GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance)
{
    new Float:a;
    GetPlayerPos(playerid, x, y, a);
    GetPlayerFacingAngle(playerid, a);
    if (GetPlayerVehicleID(playerid))
    {
      GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
    }
    x += (distance * floatsin(-a, degrees));
    y += (distance * floatcos(-a, degrees));
}



Re: GetXYInFrontOfPlayer error - clean180ollie - 07.08.2009

When I cant find it out.. And When im about to give up... I just put the undefined on top like this so copy and paste this to the top of your script

new GetXYInFrontOfPlayer[MAX_PLAYERS];


Doubt it will work, buts its worth a try.


Re: GetXYInFrontOfPlayer error - AleksandarAdzic - 07.08.2009

THanks kc, i got idea from your contest


I didnt use new Float cus i used other system already, so just implent that

Also i just defined distance

#define distance 5.0

and it all works