19.04.2013, 16:30
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]; }