Quote:
Originally Posted by Jefff
pawn Код:
getNearestPizzeria(Float:X1,Float:Y1,Float:Z1) { new index; new Float:distOld; new Float:distNew; for(new i; i<cantidadPizzerias; i++) { distNew=floatsqroot(floatpower(floatabs(floatsub(Pizzerias[i][X],X1)),2)+floatpower(floatabs(floatsub(Pizzerias[i][Y],Y1)),2)+floatpower(floatabs(floatsub(Pizzerias[i][Z],Z1)),2)); if(distNew > distOld) { distOld=distNew; index=i; } } return index; }
|
Thanks man! Didn't see that :P, just looked over it
You're the best!