Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
public plugin_init()
{
register_plugin("AMX-Score","0.1","Rustynails")
register_clcmd("amx_score","do_score",ADMIN_BAN)
}
public do_score(id)
{
new user[32], killsstring[4], deathstring[4], uid
read_argv(1,user,31)
read_argv(2,killsstring,3)
read_argv(3,deathstring,3)
uid = find_player("bhl",user)
new deaths=str_to_num(deathstring)
new kills=str_to_num(killsstring)
if (access(id,ADMIN_BAN))
{
if (deaths)
{
if (isdigit(kills))
{
if (isdigit(deaths))
{
if (uid)
{
set_user_frags(uid,kills)
cs_set_user_deaths(uid,deaths)
console_print(id,"Changed score.")
}
else
{
console_print(id,"No such user has been identified on this server.")
}
}
else
{
console_print(id,"The amount of deaths may only be in numbers.")
}
}
else
{
console_print(id,"The amount of kills may only be in numbers.")
}
}
else
{
console_print(id,"You did not supply enough information.")
}
}
else
{
console_print(id,"You do not have enough access to use this command.")
}
return PLUGIN_HANDLED
}