17.06.2018, 21:38
So I'm new to scripting and I want to script something that would, for example:
The server has 10 players.
3 random players get picked to be criminals, 7 get to be cops and spawn in random places around the town.
Southclaws tried helping me but what he said seems out of my league so.
Southclaws - Today at 12:22 AM
if you use y_iterate, you can simply create an iterator then iterate through it and use Iter_Random to select one, then remove it with Iter_SafeRemove
you end up with two iterators, one for one team and one for another
if you're not using iterators, it will require a bit more code
So how do I actually put this in practice?
The server has 10 players.
3 random players get picked to be criminals, 7 get to be cops and spawn in random places around the town.
Southclaws tried helping me but what he said seems out of my league so.
Southclaws - Today at 12:22 AM
if you use y_iterate, you can simply create an iterator then iterate through it and use Iter_Random to select one, then remove it with Iter_SafeRemove
you end up with two iterators, one for one team and one for another
if you're not using iterators, it will require a bit more code
So how do I actually put this in practice?