ID:887020
 
(See the best response by Boubi.)
Code:
                                                    for(var/mob/R in Red)
CTFPrizes(R)
Red.Remove(R)
for(var/mob/B in Blue)
Blue.Remove(B)


                                                    for(var/mob/B in Blue)
CTFPrizes(B)
Blue.Remove(B)
for(var/mob/R in Red)
Red.Remove(R)


    CTFPrizes(mob/M)
var/prize
prize=input(M,"What will your prize be?")in list("TP Pack","Energy Drink","Steroids","Painkillers","Power Bar","Zenni")
if(prize=="TP Pack")
if(M.inven_min < M.inven_max)
M.inven_min ++
M.contents += new/obj/Equipment/Consumable/Tps_Pack
M<<"<font color=green><b>You receive a TP pack</font></b>"
else
M<<"<font color=green><b>Not enough room in your bag! Here's some zenni instead!</font></b>"
M.zenni += 10000000
else if(prize=="Energy Drink")
if(M.inven_min < M.inven_max)
M.inven_min ++
M.contents += new/obj/Equipment/Consumable/Energy_Drink
M<<"<font color=green><b>You receive an Energy Drink</font></b>"
else
M<<"<font color = green><b>Not enough room in your bag! Here's some zenni instead!</font></b>"
M.zenni += 10000000
else if(prize=="Steroids")
if(M.inven_min < M.inven_max)
M.inven_min ++
M.contents += new/obj/Equipment/Consumable/Steroids
M<<"<font color = green><b>You receive some steroids!</font></b>"
else
M<<"<font color=green><b>Not enough room in your bag! Here's some zenni instead!</font></b>"
M.zenni += 10000000
else if(prize=="Painkillers")
if(M.inven_min < M.inven_max)
M.inven_min ++
M.contents += new/obj/Equipment/Consumable/Painkillers
M<<"<font color=green><b>You receive some painkillers!</font></b>"
else
M<<"<font color=green><b>Not enough room in your bag! Here's some zenni instead!</font></b>"
M.zenni += 10000000
else if(prize=="Power Bar")
if(M.inven_min < M.inven_max)
M.inven_min ++
M.contents += new/obj/Equipment/Consumable/Power_Bar
M<<"<font color=green><b>You receive a Power Bar!</font></b>"
else
M<<"<font color=green><b>Not enough room in your bag! Here's some zenni instead!</font></b>"
M.zenni += 10000000
else if(prize=="Zenni")
M.zenni += 10000000
M<<"<font color=#5f9ea0>You have been blessed with more Zenni"



Problem description:Every time theres a winning team in CTF, each player has to wait their turn to choose their prize. Is there a way for everyone to get the input prize choices at the same time instead of having to wait until someone else chooses it? Any help will be appreciated. Thanks!

Use spawn() CTFPrizes(R). spawn() starts the process on a separate thread or something like that, allowing you to do that.
for(var/mob/R in Red)
spawn(10) CTFPrizes(R).spawn()

So like that?

or like

CTFPrizes(R).spawn(10)?
Best response
Start looking into the reference when you see a built-in proc that you're unfamiliar with, you might actually learn something every once and awhile.

No. None of those. You don't need to insert a time for the spawn(), it'll take null.

spawn() CTFPrizes(R/B)
I know how spawn works, but I got a bit confused with how your wrote it. but it worked! thanks!