GetXYInFrontOfPlayer error
#1

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

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));
}
Reply
#3

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

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)