|
Veteran Member
Join Date: Feb 2016
Location: brazil
|
01-06-2021
, 02:16
Re: reset score, add hud function
|
#3
|
Quote:
Originally Posted by YonatanM
Code:
#include <amxmodx>
#include <reapi>
#include <dhudmessage>
#define PLUGIN "resetscore(ReAPI)"
#define VERSION "1.0"
#define AUTHOR "modders"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR);
register_clcmd("say .rr", "resetscore");
register_clcmd("say_team .rr", "resetscore");
register_clcmd("say /rs", "resetscore");
register_clcmd("say /resetscore", "resetscore");
}
public resetscore(id) {
if(!is_user_connected(id)) return;
set_entvar(id, var_frags, 0.0);
set_member(id, m_iDeaths, 0);
set_dhudmessage(random(256), random(256),
random(256), -1.0, 0.72, 2, 6.0, 3.0, 0.1, 1.5);
show_dhudmessage(id, "^nYour Prefix");
set_dhudmessage(random(256), random(256),
random(256), -1.0, 0.79, 2, 6.0, 3.0, 0.1, 1.5);
show_dhudmessage(id, "You have reset your score.");
client_print_color(id, print_team_blue, "^3Score Resetado!");
client_cmd(id, "spk fvox/buzz.wav");
message_begin(MSG_ALL, 85);
write_byte(id);
write_short(0); write_short(0); write_short(0); write_short(0);
message_end();
}
|
thanks for your reply but its not what i want, i don`t want to notify the player when he resets his score, i want the player spectating to see how many times that player has used the reset command
like if i`m watching you play, i can see on hud how many times you used the resetscore in that map
|
|
|
|