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

Code:
#include <amxmodx> #if !defined MAX_PLAYERS const MAX_PLAYERS = 32 #endif const FRAG_LIMIT = 10 const ADMIN_FLAG = ADMIN_LEVEL_G // Modify the ban command to your needs // Default: amx_ban <minutes> <userid> <reason> #define BAN_COMMAND "amx_ban 180 #%i ^"Frag Limit Over^"" new g_iFrags[MAX_PLAYERS + 1] public plugin_init() {     register_plugin("Frag Limit Ban", "1.1", "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) && !(get_user_flags(iAttacker) & ADMIN_FLAG))     {         if(++g_iFrags[iAttacker] == FRAG_LIMIT)         {             server_cmd(BAN_COMMAND, get_user_userid(iAttacker))         }     } }

Here's the code I am using.
__________________
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

Last edited by allroundernaman; 07-18-2020 at 08:38.
allroundernaman is offline