View Single Post
allroundernaman
Member
Join Date: May 2020
Location: Somewhere Virtual
Old 07-14-2020 , 13:14   Re: Auto-Ban after reaching a frag limit
Reply With Quote #4

Quote:
Originally Posted by OciXCrom View Post
Remind me again what is the point of this plugin?
Set the ban command on line 10.

Code:
#include <amxmodx> #if !defined MAX_PLAYERS const MAX_PLAYERS = 32 #endif const FRAG_LIMIT = 50 // Modify the ban command to your needs // Default: amx_ban <minutes> <userid> <reason> #define BAN_COMMAND "amx_ban 120 #%i ^"frag limit reached^"" new g_iFrags[MAX_PLAYERS + 1] public plugin_init() {     register_plugin("Frag Limit Ban", "1.0", "OciXCrom")     register_event("DeathMsg", "OnPlayerKilled", "a") } public client_putinserver(id) {     g_iFrags[id] = 0 } public OnPlayerKilled() {     new iAttacker = read_data(1)     if(is_user_connected(iAttacker) && iAttacker != read_data(2))     {         if(++g_iFrags[iAttacker] == FRAG_LIMIT)         {             server_cmd(BAN_COMMAND, get_user_userid(iAttacker))         }     } }
Thanks for this. But I would like to ask you that does this ban admins too? As I was a admin I was banned. Is your plugin banning admins too? Thanks for the help.
Also if this is made not to ban admins, let me know I will check what's wrong with my users.ini file.

Regards,
__________________
SELLING COUNTER STRIKE SERVERS!! [email protected]

Website: https://namanvrati.cf/
Cheap Rates/ Renting also available.
Introducing myself: This is Naman Vrati, call me NamVr! I am a web developer and Counter Strike Server Manager, I own a server.

Piano Is My Life
allroundernaman is offline