Retrieving the string from the function is blank.
#5

Quote:
Originally Posted by Laurey
Посмотреть сообщение
Try this one
pawn Код:
stock GetDirection(Float:Angle)
{
    new direction[30];
    if(350 < Angle <= 10)
    {
        format(direction, sizeof(direction), "North");
    }
    else if(10 < Angle <= 80)
    {
        format(direction, sizeof(direction), "North-East");
    }
    else if(80 < Angle <= 100)
    {
        format(direction, sizeof(direction), "East");
    }
    else if(100 < Angle <= 170)
    {
        format(direction, sizeof(direction), "South-East");
    }
    else if(170 < Angle <= 190)
    {
        format(direction, sizeof(direction), "South");
    }
    else if(190 < Angle <= 260)
    {
        format(direction, sizeof(direction), "East-West");
    }
    else if(260 < Angle <= 280)
    {
        format(direction, sizeof(direction), "West");
    }
    else if(280 < Angle <= 350)
    {
        format(direction, sizeof(direction), "North-West");
    }
    return direction;
}
new Float:Angle;
GetPlayerFacingAngle(i,Angle);
new zone[MAX_ZONE_NAME];
GetPlayer2DRadarZone(i, zone, sizeof(zone));
format(string, sizeof(string), "{39AACC}[CONTROL]: {FFFFFF}Vehicle was last seen in %s traveling %s.",zone, direction);
It's returning strings but not the right ones lol. Is their a more efficient accurate way to do this? I'm confused. I figured GetPlayerFacingAngle would be accurate since the driver is facing the same way as the vehicle.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)