#include <amxmodx>
#include <reapi>
#if AMXX_VERSION_NUM < 183
#include <colorchat>
#endif
#define PLUGIN "resetscore(ReAPI)"
#define VERSION "1.0"
#define AUTHOR "Phantom"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR);
register_clcmd("say /rs", "resetscore"); register_clcmd("say_team /rs", "resetscore");
}
public resetscore(id) {
if(!is_user_connected(id)) return;
set_entvar(id, var_frags, 0.0);
set_member(id, m_iDeaths, 0);
client_print_color(id, print_team_blue, "^3Ваш счет успешно обнулен!");
message_begin(MSG_ALL, 85);
write_byte(id);
write_short(0); write_short(0); write_short(0); write_short(0);
message_end();
}
Помогло, спасибоd4nt3,C++:#include <amxmodx> #include <reapi> #if AMXX_VERSION_NUM < 183 #include <colorchat> #endif #define PLUGIN "resetscore(ReAPI)" #define VERSION "1.0" #define AUTHOR "Phantom" public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR); register_clcmd("say /rs", "resetscore"); register_clcmd("say_team /rs", "resetscore"); } public resetscore(id) { if(!is_user_connected(id)) return; set_entvar(id, var_frags, 0.0); set_member(id, m_iDeaths, 0); client_print_color(id, print_team_blue, "^3Ваш счет успешно обнулен!"); message_begin(MSG_ALL, 85); write_byte(id); write_short(0); write_short(0); write_short(0); write_short(0); message_end(); }
#include <amxmodx>
#include <reapi>
#if AMXX_VERSION_NUM <183
#include <colorchat>
#endif
#define PLUGIN "resetscore (ReAPI)"
#define VERSION "1.0"
#define AUTHOR "Phantom"
public plugin_init () {
register_plugin (PLUGIN, VERSION, AUTHOR);
register_clcmd ("say / rs", "resetscore"); register_clcmd ("say_team / rs", "resetscore");
}
public resetscore (id) {
if (! is_user_connected (id)) return;
set_entvar (id, var_frags, 0.0);
set_member (id, m_iDeaths, 0);
new name [32]; get_user_name (id, name, 31);
client_print_color (id, print_team_blue, "Player% s ^ 3your score has been reset", name);
message_begin (MSG_ALL, 85);
write_byte (id);
write_short (0); write_short (0); write_short (0); write_short (0);
message_end ();
}
успешно обнулён
write_string("^4[Сервер] ^3Игрок ^4%s ^3Ваш счет обнулён!");