Quote:
Originally Posted by kblo
Managed to apply this to display to all players at once but still not 100%.
this command shows how much all players have but i want to apply this to the server so it would be automated by round start.
admin_execall say_team /money; say_team /money;
this works with plugin uploaded to the server.
anyone knows how to put the idea with the plugin itself?
|
Try this, it will print the money amount after the freezetime has ended.
PHP Code:
/* say_team /money // client cmd */
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>
#define PLUGIN "show_money"
#define VERSION "1.0"
#define AUTHOR "Weejee & n2k"
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /money", "cmd_money")
register_clcmd("say_team /money", "cmd_money")
RegisterHam(Ham_Spawn, "player", "Ham_CBasePlayer_Spawn_Post", 1)
}
public cmd_money(id) {
new iMoney;
new money_Buffer[100+1];
iMoney = cs_get_user_money(id);
format( money_Buffer, 100, "$%d", iMoney );
engclient_cmd( id, "say_team", money_Buffer );
}
public Ham_CBasePlayer_Spawn_Post(id)
{
if(is_user_alive(id))
{
cmd_money(id)
}
}
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.