Hi!
I would like if it's possible to have a plugin that detects players without sxe-injected , so i put sxe in optional mod , and if a player doesn't have the anticheat installed and active he's nick will be tag-ed with [NO-sXe-I].
The plugin should detect players with [NO-sXe-I] at every round start and punish them with 25 hp (this value should be configurable)
Here is SAMURAI's try but no effect on players
Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#define PLUGIN "No SXe Detect"
#define VERSION "1.0"
#define AUTHOR "SAMURAI"
new cvar_rmv_health;
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("HLTV", "event_new_round", "a", "1=0", "2=0");
cvar_rmv_health = register_cvar("health_penalty","10");
}
public event_new_round()
{
static players[32], name[32], inum, i, id;
get_players(players,inum);
for(i = 0; i< inum;i++)
{
id = players[i];
get_user_name(id,name,31);
if(is_user_alive(id) && containi(name,"[NO-sXe-I]") !=-1 )
{
set_user_health(id,get_user_health(id) - get_pcvar_num(cvar_rmv_health));
client_print(id,print_chat,"Ti s-a scazut %d din viata pentru ca nu ai sXe Inejected activat !",get_pcvar_num(cvar_rmv_health));
}
}
}
thx in advance