Hi all,
I try to create a plugin that will automatically kick players with the nickname "player" or "Player" but I have a little problem with the script ... Actually I started with programming Amx ..
Can someone help me?
Here is the script :
PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "Player Auto kick"
#define VERSION "1.0"
#define AUTHOR "SysCorp"
new reason;
reason="Merci de changer de pseudo / Please change nickname";
public plugin_init()
{
register_concmd("amx_kick", "cmdKick", ADMIN_KICK, "<name or #userid> [reason]")
}
public auto_kick(id) {
new name[32];
get_user_name(id, name, 31)
if(name == "player")
{
log_amx("Kick: ^"%s<%d><%s><>^" kick ^"%s<%d><%s><>^" (reason ^"%s^")", name, reason)
server_cmd("kick #%d %s", name, reason)
}
}