trying to reset money on round start but nothing happens other than resetting the variable
swapTeamsQueried.
No errors are thrown
PHP Code:
public onRoundStart()
if(swapTeamsQueried) {
swapTeamsQueried = false
set_task(0.1, "resetMoney")
}
public resetMoney() {
new players[32], playerCount
get_players(players, playerCount, "h") // exclude hltv, but is needed?
new money = get_pcvar_num(mp_startmoney)
for(new i = 0; i < playerCount; i++) {
cs_set_user_money(players[i], money)
}
}