Raised This Month: $12 Target: $400
 3% 

[REQUEST] CS:S money methods


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ferret
SourceMod Developer
Join Date: Dec 2004
Location: Atlanta, GA
Old 06-16-2007 , 11:23   [REQUEST] CS:S money methods
Reply With Quote #1

Looking for a way to get and set player's money in CS:S. If this could be done with a little word through the core SM, great, if not, let me know what can help me accomplish this.

I basicly just need the equivolents of cs_get_player_money(id) and cs_set_player_money(id, amount)
__________________
I'm a blast from the past!
ferret is offline
Knagg0
SourceMod Donor
Join Date: Dec 2005
Location: Germany
Old 06-16-2007 , 11:29   Re: [REQUEST] CS:S money methods
Reply With Quote #2

Code:
new g_iAccount = -1;

public OnPluginStart()
{
	g_iAccount = FindSendPropOffs("CCSPlayer", "m_iAccount");
}

public SetMoney(client, amount)
{
	if(g_iAccount != -1)
		SetEntData(client, g_iAccount, amount);
}

public GetMoney(client)
{
	if(g_iAccount != -1)
		return GetEntData(client, g_iAccount);

	return 0;
}
__________________

MFZB Gaming Community

[ www.mfzb.de ]


Last edited by Knagg0; 06-16-2007 at 19:28.
Knagg0 is offline
ferret
SourceMod Developer
Join Date: Dec 2004
Location: Atlanta, GA
Old 06-16-2007 , 13:25   Re: [REQUEST] CS:S money methods
Reply With Quote #3

Much love
__________________
I'm a blast from the past!
ferret is offline
zogi79
New Member
Join Date: Jun 2007
Old 06-22-2007 , 08:37   Re: [REQUEST] CS:S money methods
Reply With Quote #4

How would the code look like to create a new admin command called sm_cash that would give all players in all teams 16000 money?
I had such command in mani and it was very usefull for warmup before pcws.
zogi79 is offline
ferret
SourceMod Developer
Join Date: Dec 2004
Location: Atlanta, GA
Old 06-26-2007 , 10:07   Re: [REQUEST] CS:S money methods
Reply With Quote #5

http://forums.alliedmods.net/showthr...902#post494902
__________________
I'm a blast from the past!
ferret 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 12:26.


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