#include <amxmodx>
#include <fun>
#include <cstrike>
#include <hamsandwich>
new text[64],name[32],message[128]
public plugin_init() {
register_plugin("XXX", "XXX", "XXX")
register_clcmd("say /re", "mostrarmenu")
register_clcmd("say /remenu", "mostrarmenu")
}
public mostrarmenu(id)
{
new menu = menu_create("\g 重置选单:", "mostrar_cliente")
menu_additem(menu, "\r 杀敌数量、\r死亡次数", "1", 0)
menu_additem(menu, "\r 杀敌数量", "2", 0)
menu_additem(menu, "\r 死亡次数", "3", 0)
menu_display(id, menu, 0)
}
public mostrar_cliente(id, menu, item)
{
new data[6], iName[64]
new access, callback
menu_item_getinfo(menu, item, access, data,5, iName, 63, callback)
new key = str_to_num(data)
switch(key)
{
case 1:{
set_user_frags(id, 0)
cs_set_user_deaths(id, 0)
format(message,127,"^x04你已成功重置了杀敌次数、死亡次数",name,text)
client_color(0,id,message)
}
case 2:{
set_user_frags(id, 0)
format(message,127,"^x04你已成功重置了杀敌次数",name,text)
client_color(0,id,message)
}
case 3:{
cs_set_user_deaths(id, 0)
format(message,127,"^x04你已成功重置了死亡次数",name,text)
client_color(0,id,message)
}
}
menu_destroy(menu)
return PLUGIN_CONTINUE
}