Участник
Пользователь
- Сообщения
- 272
- Реакции
- 14
Hi.
I want to add the player's nickname to the [DEMO] chat information.
I tried this:
new szName [64]
client_print_color (id, print_team_red, "^ 1 [^ 4DEMO ^ 1] We die with honor [ONLY DD2] [^ 3% s ^ 1] ^ 4% s", datee, szName);
but it doesn't show.
Can anyone help?
I want to add the player's nickname to the [DEMO] chat information.
I tried this:
new szName [64]
client_print_color (id, print_team_red, "^ 1 [^ 4DEMO ^ 1] We die with honor [ONLY DD2] [^ 3% s ^ 1] ^ 4% s", datee, szName);
but it doesn't show.
Can anyone help?
Код:
#include <amxmodx>
#define DELAY 5
#define SHOW_INFO
#define DEMONAME "NAME_SERVER_DEMO"
new bool:g_bAllowRecord[33];
public plugin_init()
{
register_plugin("DemoRecoder", "1.1", "neygomon");
register_clcmd("joinclass", "Start_demo");
register_clcmd("menuselect", "Start_demo");
}
public client_putinserver(id)
g_bAllowRecord[id] = bool:(!is_user_bot(id) && !is_user_hltv(id));
public Start_demo(id)
{
if(g_bAllowRecord[id])
{
#if DELAY > 0
set_task(float(DELAY), "StartDemo", id);
#else
StartDemo(id);
#endif
g_bAllowRecord[id] = false;
}
}
public StartDemo(id)
{
if(!is_user_connected(id))
return;
client_cmd(id, "stop; record ^"%s^"", DEMONAME);
#if defined SHOW_INFO
new datee[30];get_time("%d.%m.%Y - %H:%M:%S", datee, charsmax(datee));
client_print_color(id, print_team_blue, "^1[^4DEMO^1] Automatyczne nagrywanie demo:^3 %s.dem", DEMONAME);
client_print_color(id, print_team_red, "^1[^4DEMO^1] NAME SERVER [^3%s^1]", datee);
#endif
}