Quote:
Originally Posted by Schneider
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", pDistance); return index; }
|
I'll give it a try an let you know

.
Edit:
Didn't work.. still keeps going to the same place: Distance == 2764.433349