
Quake DeveLS - No More Flooding!
Author: Cryect
Difficulty: Easy
Okay I've had enough of
people flooding everyone on servers sure flood protection is in the latest Q2
and CTF but what good does that do for all the mods. Well don't worry because
here is a simple tutorial to fix all those problems
First add this code to the
client structure in "g_local.h".
//Flood prevention variables
float floodtime1;
float floodtime2;
Alright
now goto Cmd_Say_f in "g_cmds.c" and put this code right after the
declaration of variables.
//flood protection codeint floodtime;
if(ent->client->floodtime2client->floodtime1>level.time)
ent->client->floodtime2 = level.time + 10; } else { floodtime=(int)(ent->client->floodtime2-level.time); gi.cprintf(ent, PRINT_HIGH, "Cannot talk for %i more seconds/n",floodtime); return; } ent->client->floodtime1 = level.time + 15; //end flood protection codeOkay thats
all it takes! Well some suggestions are to set it up for CVARS so the servers
can change the numbers.
Tutorial by Cryect
|
This
site, and all content and graphics displayed on it, |