Annoyed - confused - Befuzzled
#1

Okay, So I want it to search for a house thats within 2500..
But it just keeps giving the same house...... Literally 35 attempts it gives the same place.
Код:
getClosestPizzaDelivery(playerid) {
	new Float:pDistance;
	new index;
	for(new i=0;i<sizeof(Houses);i++) {
		pDistance = GetPlayerDistanceFromPoint(playerid, Houses[i][EHouseX], Houses[i][EHouseY], Houses[i][EHouseZ]);
		if(pDistance > random(2500)) {
			continue;
		}
		index = i;
	}
	SetPVarFloat(playerid, "PizzaTravelDistance", pDistance);
	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)