Hey guys..need a little bit of help with this..It is suposed to check if the players kills are 3 times more than their deaths and if so, kick them...can u all help me?
Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "ktd"
#define VERSION "0.1"
#define AUTHOR "SweatyBanana"
#define Frags = get_user_frags(id)
#define Deaths = get_user_deaths(id)
#define MAXFRAGDEATH = 3 * Deaths
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("ResetHUD", "ktd", "b")
}
public ktd(id)
{
new player[32]
read_argv(1,player,31)
new holder[200]
if(Frags >= MAXFRAGDEATH)
{
format(holder,199,"amx_kick %s",player)
get_user_name(target,player,31)
client_print(0,print_chat,"[KTD] %s has been kicked due to too high of a Kill/Death ratio.",player)
}
else
{
return PLUGIN_CONTINUED
}
}