IsPlayerInRangeOfPoint problem...
#1

I want to make a spawn at the events and if spawn id x its unoccupied to put the player in the spawn site x.
Код HTML:
function EventSpawn() {
	new spawnid = -1;
	foreach(new i : Player) {
		for(new sid = 0; sid < 24; sid++) {
			if(IsPlayerInRangeOfPoint(i, 1.0, EventSpawn[sid][0], EventSpawn[sid][1], EventSpawn[sid][2])) { }
			else if(!IsPlayerInRangeOfPoint(i, 1.0, EventSpawn[sid][0], EventSpawn[sid][1], EventSpawn[sid][2])) spawnid = sid;
		}
		return spawnid;
	}
	return -1;
}
And puts me directly in the spawn with the id 23, why not start from id 0 1 etc?
Reply


Messages In This Thread
IsPlayerInRangeOfPoint problem... - by qRazor - 02.03.2019, 11:54
Re: IsPlayerInRangeOfPoint problem... - by qRazor - 02.03.2019, 20:55
Re: IsPlayerInRangeOfPoint problem... - by NaS - 02.03.2019, 21:21
Re: IsPlayerInRangeOfPoint problem... - by qRazor - 03.03.2019, 10:48

Forum Jump:


Users browsing this thread: 1 Guest(s)