cmd:refuel
#4

Quote:
Originally Posted by Excips
Посмотреть сообщение
Show the code related to GetClosestGasPump
Код:
stock GetClosestGasPump(playerid, &businessid, &pumpslot)
{
	new Float: minrange = 5.0, Float: range;

	businessid = INVALID_BUSINESS_ID;

    for(new b = 0; b < MAX_BUSINESSES; b++)
    {
	    for(new i = 0; i < MAX_BUSINESS_GAS_PUMPS; i++)
	    {
	        range = GetPlayerDistanceFromPoint(playerid, Businesses[b][GasPumpPosX][i], Businesses[b][GasPumpPosY][i], Businesses[b][GasPumpPosZ][i]);
	 	    if (range < minrange)
			{
				businessid = b;
				pumpslot = i;
			    minrange = range;
		    }
	   	}
 	}
}
here.
Reply


Messages In This Thread
cmd:refuel - by rhandie02 - 24.02.2015, 06:11
Re: cmd:refuel - by Excips - 24.02.2015, 06:26
Re: cmd:refuel - by ball - 24.02.2015, 16:11
Re: cmd:refuel - by rhandie02 - 25.02.2015, 05:07
Re: cmd:refuel - by rhandie02 - 01.03.2015, 02:26
Re: cmd:refuel - by 1fret - 01.03.2015, 04:41
Re: cmd:refuel - by Blade_Cervetti - 01.03.2015, 05:05
Re: cmd:refuel - by rhandie02 - 04.03.2015, 01:47
AW: cmd:refuel - by Kaliber - 04.03.2015, 07:03

Forum Jump:


Users browsing this thread: 1 Guest(s)