i was wondering if anyone could port the code below, that i found for amx, over too sourcemod. i am having hell with hackers on cafe accounts and would just like to get rid of all cafe steam id's as i come across them by editing the plugins code and adding the steam id's or parts of them. preferebly rather then a kick i would like to ban the offending steam id upon a match to sourcebans.
Code:
#include <amxmodx>
public plugin_init()
{
register_plugin("Mass SteamID Ban", "1.0", "Lee");
}
public client_authorized(id)
{
new userSteamID[20];
//place the full SteamID inside userSteamID
get_user_authid(id, userSteamID, 19);
//remove 'STEAM_0:x:'
format(userSteamID, 19, userSteamID[10]);
//if the SteamID is 8 digits long and the first 3 characters equal "157" or "156"
if(strlen(userSteamID) == 8 && (equal(userSteamID, "157", 3) || equal(userSteamID, "156", 3)))
{
//kick them
server_cmd("kick #%i", get_user_userid(id));
}
}
thanks for anyones input into this
siosios