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

[EXTENSION] CSS No Money Limit


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 10-25-2010 , 22:20   [EXTENSION] CSS No Money Limit
Reply With Quote #1

OBSOLETE USE http://forums.alliedmods.net/showthr...53#post1630953

Playing around with testing a plugin i needed unlimited money so i detoured AddAccount (and kept returning 16000). So after that came this idea. It "removes" the money limit from players. So players can now have more than 16000. It dosnt necessarily remove it but kinda works around it (before if you had more than 16000 the game would just set it to 16000). So here it is.

At some point ill create some forwards.

Note this is my first "real" extension (my other one was a speed modify one that was more for testing something) so any tips are more than welcome. Please report any problems im rather new to sigscanning so im not sure if it is totally correct (if someone can have a look that would be awesome).

Thanks:
BAILOPAN for his awesome cssdm extension (learned a lot from that)
pRED* for his awesome detour class
psychonic for helping me with linux compile issues
SourceMod Dev

If you just want the extension download the extension zip not the src one. Simply extract into your addons folder. Please report any bugs!

As a side note i didnt test if it truely is unlimited but i went up to about 35000 (and in theory should be i think). Also Im not sure but at one point the values on hud will not display the correct amount i think but the player should still have the correct ammount (it just wont display correctly).

CVARS:
Code:
//Sets the max money someone can have
//default 65000
mp_maxmoney
Attached Files
File Type: zip account-extension-src.zip (25.0 KB, 806 views)
File Type: zip account-extension.zip (105.2 KB, 1266 views)

Last edited by Dr!fter; 01-17-2012 at 09:36. Reason: Fixed zips
Dr!fter is offline
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 10-26-2010 , 15:25   Re: [EXTENSION] CSS No Money Limit
Reply With Quote #2

Updated now includes Linux version. Also now includes plugin to set mp_startmoney limit to 100000 (if you set it to 100000 the value in hud isnt displayed correctly at some point it starts to display incorrect dont know at which point). Just set it in server.cfg to amount you want like you normally would. I tested very little on Linux so if there is any problems report them.

Make sure to remove any plugin that modifies cash value (extra_cash plugin for example was throwing off my testing ^^)

Source for both plugin and extension is in src zip. In the next version of the plugin there will be a way to limit how much money a player can have.

Last edited by Dr!fter; 10-26-2010 at 15:58.
Dr!fter is offline
thetwistedpanda
Good Little Panda
Join Date: Sep 2008
Old 10-26-2010 , 16:04   Re: [EXTENSION] CSS No Money Limit
Reply With Quote #3

So this removes the 64000 maximum cash limit imposed by CS:S? If so it could prove very useful for RPG/Zombie mods that need a way to display Health correctly.
__________________
thetwistedpanda is offline
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 10-26-2010 , 16:24   Re: [EXTENSION] CSS No Money Limit
Reply With Quote #4

Quote:
Originally Posted by thetwistedpanda View Post
So this removes the 64000 maximum cash limit imposed by CS:S? If so it could prove very useful for RPG/Zombie mods that need a way to display Health correctly.
No that still exists (im assuming your talking about the hud display). But it allows you to earn more money than 16000. Normally if you have 16000 you cant earn anymore money. This allows it to go beyond the 16000. So you actually can keep all the money you earn.

Last edited by Dr!fter; 10-26-2010 at 16:29.
Dr!fter is offline
thetwistedpanda
Good Little Panda
Join Date: Sep 2008
Old 10-26-2010 , 16:32   Re: [EXTENSION] CSS No Money Limit
Reply With Quote #5

Ah so this removes the 16k limit but still imposes the 64k limit in the hud. Gotcha.
__________________
thetwistedpanda is offline
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 10-26-2010 , 16:34   Re: [EXTENSION] CSS No Money Limit
Reply With Quote #6

Quote:
Originally Posted by thetwistedpanda View Post
Ah so this removes the 16k limit but still imposes the 64k limit in the hud. Gotcha.
Yup atleast someone knows what the hud limit is ^^. You can earn more than 64K but then it gets all screwy in hud. I doubt anything server side can remove hud limit.
Dr!fter is offline
siangc
Senior Member
Join Date: Mar 2010
Old 10-29-2010 , 01:22   Re: [EXTENSION] CSS No Money Limit
Reply With Quote #7

Thanks, works perfect so far
__________________
siangc is offline
databomb
Veteran Member
Join Date: Jun 2009
Location: california
Old 02-10-2011 , 13:58   Re: [EXTENSION] CSS No Money Limit
Reply With Quote #8

Quote:
Originally Posted by Dr!fter View Post

Make sure to remove any plugin that modifies cash value (extra_cash plugin for example was throwing off my testing ^^)
So would this not be compatible with a plugin doing something like:
g_CashEntLoc = FindSendPropOffs("CCSPlayer", "m_iAccount")
SetEntData(client, g_CashEntLoc, "54321")
or should the plugins just be aware that the cash can now go over 16k?
__________________
databomb is offline
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 02-10-2011 , 19:44   Re: [EXTENSION] CSS No Money Limit
Reply With Quote #9

Quote:
Originally Posted by databomb View Post
So would this not be compatible with a plugin doing something like:
g_CashEntLoc = FindSendPropOffs("CCSPlayer", "m_iAccount")
SetEntData(client, g_CashEntLoc, "54321")
or should the plugins just be aware that the cash can now go over 16k?
You can do that. But yea some plugins will check if its over 16K and just give 16K. So yes just be aware that it can be over 16K. I will add a cvar at some point that can be checked (mp_maxmoney)
Dr!fter is offline
FaTony
Veteran Member
Join Date: Aug 2008
Old 02-10-2011 , 20:02   Re: [EXTENSION] CSS No Money Limit
Reply With Quote #10

Netprop dump says that 16 bits are reserved for m_iAccount, which means that maximum value is 65536.
__________________
FaTony 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 07:49.


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