Instead of if( !dead && !kill ) you should check if( dead || kill ) aka if( dead != 0 || kill != 0 ).
Try this :
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#define m_iDeaths 444
new connor[33]
new pcvar_hmtimes
public plugin_init()
{
register_plugin("Reset Score", "1.1", "Whatever")
register_clcmd("say /resetscore", "reset_score")
register_clcmd("say /rs", "reset_score")
register_clcmd("say_team /resetscore", "reset_score")
register_clcmd("say_team /rs", "reset_score")
pcvar_hmtimes = register_cvar("resetscore_max", "2")
}
public client_putinserver( id )
{
connor[ id ] = 0
}
public reset_score(id)
{
new frags = get_user_frags( id )
if( frags || get_pdata_int(id, m_iDeaths) )
{
if( get_user_flags(id) & ADMIN_LEVEL_F || ++connor[id] < get_pcvar_num(pcvar_hmtimes) )
{
set_pdata_int(id, m_iDeaths, 0)
ExecuteHam(Ham_AddPoints, id, -frags, 1)
client_print(id, print_chat, "Tocmai ti-ai resetat scorul!") // you've just reseted your score
}
else
{
client_print(id, print_chat, "Nu iti mai poti reseta scorul!") // you can't reset your score anymor
}
}
else
{
client_print(id, print_chat, "Scorul tau este deja 0-0") //your score is already 0-0
}
}
If you want to keep old method, replace :
cs_set_user_deaths(id, 0)
set_user_frags(id, 0)
cs_set_user_deaths(id, 0)
set_user_frags(id, 0)
with
set_user_frags(id, 0)
cs_set_user_deaths(id, 0) // make sure to place that one in 2nd position.
__________________