Raised This Month: $ Target: $400
 0% 

Team Money


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
sevoii
Junior Member
Join Date: May 2008
Location: South Africa
Old 05-21-2009 , 16:40   Team Money
Reply With Quote #1

I'm coding a scrim plugin and was wondering if there's any possible way to add players money status in the scoreboard.

If not, someway to show the teams money in a HUD message. I've searched around and found this:

Quote:
#include <amxmisc>
#include <fun>
#include <engine>
#include <cstrike>

#define PLUGIN "simple wartool"
#define AUTHOR "havox"
#define VERSION "0.1 beta"

new players[11], num

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say_team money", "give_user_money", 0, "- displays money")

}

public give_user_money() {
get_players(players, num)
new i
for(i=0;i<num;i++)
{
if(get_user_team(players[i]) == 1)
{
new y
new Float:height = 0.35
for(y=0;y<num;y++)
{
if(get_user_team(players[y]) == 1)
{
new moneyData = cs_get_user_money(players[y])
new playersName[18]
get_user_name(players[y], playersName, 17)
set_hudmessage(255, 255, 0, -2.0, height, 0, 0.0, 8.0, 0.1, 0.1, 1)
show_hudmessage(players[i], "%s has: %i ", playersName, moneyData)
height -= 0.10
}
}
}
else
{
new y
new Float:height = 0.35
for(y = 0; y < num; y++)
{
if(get_user_team(players[y]) == 2)
{
new moneyData = cs_get_user_money(players[y])
new playersName[18]
get_user_name(players[y], playersName, 17)
set_hudmessage(255, 255, 0, -2.0, height, 0, 0.0, 8.0, 0.1, 0.1, 1)
show_hudmessage(players[i], "%s has: %i ", playersName, moneyData)
height -= 0.10
}
}
}
}
return PLUGIN_HANDLED
}

Now this only gives 1 players current money, the reply didn't really help me that much:
http://forums.alliedmods.net/showthr...er_money%28%29

I understand what they ment, but I'm not sure on exactly how to do it. Can someone please explain a bit more please?
__________________

IS Gaming - www.ISGaming.co.za

Last edited by sevoii; 05-21-2009 at 16:41. Reason: Forgot to add quote, looked retarded.
sevoii is offline
Reply



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 01:33.


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