29.11.2013, 11:24
Thank you xVIP3Rx for helping me again
It works, but only with this little edit:
+REP
It works, but only with this little edit:
pawn Код:
stock GetPlayersNearestFuelStationPrice(playerid)
{
for(new i=0; i<MAX_FUEL_STATIONS; i++)
{
if(IsPlayerInRangeOfPoint(playerid, 10, fuel[i][f_X], fuel[i][f_Y], fuel[i][f_Z]) // If the player is near any of the stations by 10 units..
{
return fuel[i][Price]; // Return to Price of that station | OR..
//return i; This to return the station's id, If you want to return the station's id..
}
}
return -1;
}