|
Senior Member
Join Date: Mar 2016
Location: Sweden
|

11-07-2017
, 20:21
Can I "client_print" to only one team?
|
#1
|
I am using this plugin on my war server:
https://forums.alliedmods.net/showthread.php?p=1033664
But I think the HUD text looks cheap, and people always complain that I have AMX on my server.
How hard would it be to make it print the money using client_print instead?
But only have it show up for one team..
I think the multilang text looks clean and would make it look a lot better.
(I would also really appriciate if someone could tell me how to add a $ sign before the money digits.)
I belive it is this section that needs editing:
THANKS! /da nub
Quote:
public show_money(client)
{
static message[1024];
static name[32];
new money, id, len;
len = format(message, charsmax(message), "Team Economy:^n");
for (id = 1; id <= g_max_players; id++)
{
if (id != client && is_user_connected(id) && cs_get_user_team(id) == cs_get_user_team(client))
{
money = cs_get_user_money(id);
get_user_name(id, name, 31);
len += format(message[len], charsmax(message) - len, "%-22.22s: %d^n", name, money);
}
}
set_hudmessage(100, 200, 0, 0.05, 0.35, 0, 0.02, 5.0, 0.1, 0.2, 2);
ShowSyncHudMsg(client, g_sync_creat_list, message);
}
public set_team(id)
g_teammate[id] = bool read_data(2) == 1);
public show_teammate_money(id)
{
if (!get_pcvar_num(cvar_plugin_on))
return PLUGIN_HANDLED
if(!is_user_bot(id) && is_user_connected(id) && get_pcvar_num(cvar_status_on))
{
static name[32]
new pid = read_data(2)
new red = 0, blue = 0
if (cs_get_user_team(pid) == CS_TEAM_T)
red = 255
else if(cs_get_user_team(pid) == CS_TEAM_CT)
blue = 255
get_user_name(pid, name, charsmax(name))
new money = cs_get_user_money(pid)
if (g_teammate[id])
{
set_hudmessage(red, 50, blue, -1.0, 0.60, 1, 0.01, 0.6, 0.01, 0.01, 
ShowSyncHudMsg(id, g_sync_creat_statustext, "Friend:%s -- Money:%d", name, money)
}
else {
set_hudmessage(red, 50, blue, -1.0, 0.60, 1, 0.01, 0.6, 0.01, 0.01, 
ShowSyncHudMsg(id, g_sync_creat_statustext, "Enemy:%s", name)
}
}
return PLUGIN_CONTINUE
}
|
Last edited by suhdude; 11-07-2017 at 20:22.
|
|