Annoyed - confused - Befuzzled
#2

Try this:

pawn Код:
getClosestPizzaDelivery(playerid)
{
    new Float:pDistance, Float:nDistance = 9999.9, index = -1;
    for(new i=0;i<sizeof(Houses);i++)
    {
        pDistance = GetPlayerDistanceFromPoint(playerid, Houses[i][EHouseX], Houses[i][EHouseY], Houses[i][EHouseZ]);
        if(pDistance < nDistance)
        {
            nDistance = pDistance;
            index = i;
        }
    }
    SetPVarFloat(playerid, "PizzaTravelDistance", nDistance);
    return index;
}
Reply


Messages In This Thread
Annoyed - confused - Befuzzled - by Prokill911 - 05.02.2015, 20:10
Re: Annoyed - confused - Befuzzled - by Schneider - 05.02.2015, 20:27
Re: Annoyed - confused - Befuzzled - by Prokill911 - 05.02.2015, 20:52
Re: Annoyed - confused - Befuzzled - by Schneider - 05.02.2015, 21:00
Re: Annoyed - confused - Befuzzled - by Prokill911 - 05.02.2015, 21:03
Re: Annoyed - confused - Befuzzled - by Keyhead - 05.02.2015, 21:41
Re: Annoyed - confused - Befuzzled - by Schneider - 05.02.2015, 21:48
Re: Annoyed - confused - Befuzzled - by Prokill911 - 05.02.2015, 22:02
Re: Annoyed - confused - Befuzzled - by Prokill911 - 05.02.2015, 22:05
Re: Annoyed - confused - Befuzzled - by Schneider - 05.02.2015, 22:37
Re: Annoyed - confused - Befuzzled - by Keyhead - 07.02.2015, 02:01

Forum Jump:


Users browsing this thread: 1 Guest(s)