#include <amxmodx>
#include <reapi>
new const VERSION[] = "1.1.1";
new g_iMessageIdScoreInfo;
public plugin_init()
{
register_plugin("Reset Score", VERSION, "Nordic Warrior");
register_clcmd("say /rs", "ResetScore");
register_clcmd("say .кы", "ResetScore");
register_clcmd("say_team /rs", "ResetScore");
register_clcmd("say_team .кы", "ResetScore");
g_iMessageIdScoreInfo = get_user_msgid("ScoreInfo");
}
public ResetScore(id)
{
if(!is_user_connected(id))
return;
set_entvar(id, var_frags, 0.0);
set_member(id, m_iDeaths, 0);
UpdateScoreBoard(id);
client_print_color(id, print_team_default, "^3[^4RS^3] ^4Игрок ^3%n, ^4ваш счёт успешно обнулён.", id);
rg_send_audio(id, "buttons/bell1.wav");
}
stock UpdateScoreBoard(const id)
{
message_begin(MSG_BROADCAST, g_iMessageIdScoreInfo);
write_byte(id);
write_short(0);
write_short(0);
write_short(0);
write_short(get_member(id, m_iTeam));
message_end();
}