02.03.2019, 11:54
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.
And puts me directly in the spawn with the id 23, why not start from id 0 1 etc?
Код 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; }