Raised This Month: $119 Target: $400
 29% 

Money more than 16000


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HowToRuski
Senior Member
Join Date: Feb 2019
Location: Hungary
Old 11-16-2020 , 12:18   Money more than 16000
Reply With Quote #1

Hello, i have a problem. Where and how do i make it detect so that the money which goes above 16000 each round start it keeps 16000 so it doesnt give more?

Some code i have
PHP Code:
public SetMoney(id)
{
    if(
g_FirstRound == 1)
        
cs_set_user_money(id1000//For the first round
    
else 
        
cs_set_user_money(idg_iLastRoundMoney[id]+3000//Second round onward    

HowToRuski is offline
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 11-16-2020 , 12:31   Re: Money more than 16000
Reply With Quote #2

Extracted from game.cfg ( reGameDLL )

"// The maximum allowable amount of money in the game
// NOTE: Allowable money limit is 999999
//
// Default value: "16000"
mp_maxmoney 16000"
__________________
Shadows Adi is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 11-16-2020 , 14:29   Re: Money more than 16000
Reply With Quote #3

Quote:
Originally Posted by Shadows Adi View Post
Extracted from game.cfg ( reGameDLL )

"// The maximum allowable amount of money in the game
// NOTE: Allowable money limit is 999999
//
// Default value: "16000"
mp_maxmoney 16000"
Maybe he doesn't have ReGameDLL?

https://forums.alliedmods.net/showthread.php?t=24003
__________________

Last edited by OciXCrom; 11-16-2020 at 14:29.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
HowToRuski
Senior Member
Join Date: Feb 2019
Location: Hungary
Old 11-22-2020 , 04:33   Re: Money more than 16000
Reply With Quote #4

I have latest reGameDll, and it somehow gives me more money by the code i have, i need fix for the code which idk :/
HowToRuski is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 11-22-2020 , 08:20   Re: Money more than 16000
Reply With Quote #5

Just clamp the value.

Code:
cs_set_user_money(id, min(16000, cs_get_user_money(id)))
__________________
Accepting private $$$ plugins requests.

@Steam: crazy770
@Discord: CrazY.#5317

Website | Channel


Last edited by CrazY.; 11-22-2020 at 08:20.
CrazY. is offline
Reply


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 11:42.


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