Raised This Month: $ Target: $400
 0% 

Solved how to reset money on new round?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
kww
Senior Member
Join Date: Feb 2021
Location: Russia
Old 05-29-2021 , 01:30   how to reset money on new round?
Reply With Quote #1

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
(playersplayerCount"h"// exclude hltv, but is needed?
    
new money get_pcvar_num(mp_startmoney)
    for(new 
0playerCounti++) {
        
cs_set_user_money(players[i], money)
    }


Last edited by kww; 05-29-2021 at 17:17.
kww is offline
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:23.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode