[Tutorial] Efficient Multiple Spawning System
#3

Why not:

Code:
stock const offsets[][2] = {{LS_START, LS_END}, {SF_START, SF_END}, {LV_START, LV_END}};
stock GetSpawnLocation(location, &Float:x, &Float:y, &Float:z, &Float:a) {
    new idx = random(offsets[location][1] - offsets[location][0]) + offsets[location][0];
    x = spawns[idx][0];
    y = spawns[idx][1];
    z = spawns[idx][2];
    a = spawns[idx][3];
}
Reply


Messages In This Thread
[Updated]Efficient Multiple Spawning System - by Yashas - 19.04.2013, 12:41
Re: Efficient Multiple Spawning System - by Yashas - 19.04.2013, 15:48
Re: Efficient Multiple Spawning System - by Dan.. - 19.04.2013, 16:30
Re: Efficient Multiple Spawning System - by Yashas - 19.04.2013, 16:51
Re: Efficient Multiple Spawning System - by Yashas - 19.04.2013, 16:55
Re: Efficient Multiple Spawning System - by RajatPawar - 19.04.2013, 17:04
Re: Efficient Multiple Spawning System - by Yashas - 19.04.2013, 17:19
Re: Efficient Multiple Spawning System - by Yashas - 19.04.2013, 17:25
Re: Efficient Multiple Spawning System - by Vince - 19.04.2013, 17:31
Re: Efficient Multiple Spawning System - by Yashas - 19.04.2013, 17:36
Re: Efficient Multiple Spawning System - by Dan.. - 19.04.2013, 18:30
Re: Efficient Multiple Spawning System - by mastermax7777 - 20.04.2013, 05:41
Re: Efficient Multiple Spawning System - by RajatPawar - 20.04.2013, 05:48
Re: Efficient Multiple Spawning System - by Yashas - 20.04.2013, 11:18
Re: Efficient Multiple Spawning System - by Wickeed - 13.06.2013, 12:31
Re: Efficient Multiple Spawning System - by Yashas - 22.06.2013, 15:44

Forum Jump:


Users browsing this thread: 1 Guest(s)