Raised This Month: $32 Target: $400
 8% 

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 , 11: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 , 11: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"
__________________


Accepting Paid Requests, contact PM.

MVP Of The Round View project on GITHUB / AlliedModders
CSGO REMAKE ~ CSGO MOD [STABLE + SOURCE CODE]
Shadows Adi is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 11-16-2020 , 13: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 13:29.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
HowToRuski
Senior Member
Join Date: Feb 2019
Location: Hungary
Old 11-22-2020 , 03: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 , 07: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)))
__________________









Last edited by CrazY.; 11-22-2020 at 07:20.
CrazY. is offline
HowToRuski
Senior Member
Join Date: Feb 2019
Location: Hungary
Old 11-28-2020 , 05:57   Re: Money more than 16000
Reply With Quote #6

Quote:
Originally Posted by CrazY. View Post
Just clamp the value.

Code:
cs_set_user_money(id, min(16000, cs_get_user_money(id)))
And how do i check that the player has more than 16000, any way to put that in my code above?
HowToRuski is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 11-28-2020 , 06:31   Re: Money more than 16000
Reply With Quote #7

Code:
public SetMoney(id) {     new money = cs_get_user_money(id)     if(g_FirstRound == 1)         money = 1000 //For the first round     else         money = g_iLastRoundMoney[id]+3000 //Second round onward     cs_set_user_money(id, min(16000, money)) }
__________________









Last edited by CrazY.; 11-28-2020 at 10:44.
CrazY. is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 11-28-2020 , 08:09   Re: Money more than 16000
Reply With Quote #8

Quote:
Originally Posted by CrazY. View Post
Code:
public SetMoney(id) {     new money = cs_get_user_money(id)     if(g_FirstRound == 1)         money = 1000 //For the first round     else         money = g_iLastRoundMoney[id]+3000 //Second round onward     cs_get_user_money(id, min(16000, money))         // <------------- }

Code:
cs_get_user_money(id, min(16000, money))


Code:
cs_set_user_money(id, min(16000, money))
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
HowToRuski
Senior Member
Join Date: Feb 2019
Location: Hungary
Old 11-28-2020 , 11:00   Re: Money more than 16000
Reply With Quote #9

Quote:
Originally Posted by Natsheh View Post
Code:
cs_get_user_money(id, min(16000, money))


Code:
cs_set_user_money(id, min(16000, money))
cs_set_user_money(id, min(16000, money)) somehow keeps removing 3000 whats giving in my script, every new round its showing -3000 and keeps the normal value

Last edited by HowToRuski; 11-28-2020 at 13:55.
HowToRuski is offline
HowToRuski
Senior Member
Join Date: Feb 2019
Location: Hungary
Old 11-29-2020 , 07:48   Re: Money more than 16000
Reply With Quote #10

Anyone?
HowToRuski 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 06:15.


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