[Include] FloodControl.inc - LACKING FLOOD!
#1

Introduction:
Hello galerinha.. good as you all know there are some lammers who worship miserable servers with various types of flooding, such as death spam, flood chat/commands etc... with this script your problems are over! He aims to stop this, you can adimistrar various types of flood with a touch of magic!. One need only configure it to your liking .

Functions:
The script. It allows you to manage various types of floods, and configure it to your liking!

NameParametersFunction
FLOOD_CONTROL_DEATHN/AFlood death spam, fake kill
FLOOD_CONTROL_BOOTN/AFlood boot
FLOOD_CONTROL_VEHICLESN/AFlood vehicles(Car mass spawner)
FLOOD_CONTROL_COMMANDN/AFlood command
FLOOD_CONTROL_CHATN/AFlood chat
OnPlayerFloodControl(playerid, config)Control panel
OnPlayerFloodChat@Command(playerid, config)Panel of flood chat/commands
Example:
PHP код:
#include <a_samp>
#include <FloodControl>
public OnPlayerFloodControl(playeridconfig) {
    if(
config == FLOOD_CONTROL_DEATH) {
        
SendClientMessage(playerid0xFFFFFFFF"FloodControl: You have been banned for flood death!");
        
Ban(playerid);
    }
    if(
config == FLOOD_CONTROL_BOOT) {
        
SendClientMessage(playerid0xFFFFFFFF"FloodControl: You have been banned for flood boot!");
        
Ban(playerid);
    }
    if(
config == FLOOD_CONTROL_VEHICLES) {
        
SendClientMessage(playerid0xFFFFFFFF"FloodControl: You have been banned for flood vehicle! (CAR MASS SPAWNER)");
        
Ban(playerid);
    }
    if(
config == FLOOD_CONTROL_CHAT || FLOOD_CONTROL_COMMAND) {
        
SendClientMessage(playerid0xFFFFFFFF"FloodControl: You were kicked by flood chat/command!");
        
Kick(playerid);
    }
    return 
true;
}
public 
OnPlayerText(playeridtext[]) {
    
// -- Starts counting --
    
OnPlayerFloodChat@Command(playeridFLOOD_CONTROL_CHAT);
    
    return 
1;
}
public 
OnPlayerCommandText(playeridcmdtext[]) {
    
// -- Starts counting --
       
OnPlayerFloodChat@Command(playeridFLOOD_CONTROL_COMMAND);
    if(!
strcmp(cmdtext"/floodcontrol"true)) {
        
SendClientMessage(playerid0xFFFFFFFF"FloodControl: You can be kicked by flood!");
        return 
1;
    }
    return 
0;

Download:
Pastebin
original topic
Questions, suggestions, bugs, Post here!

ChangeLog:
  • 22/06/2012:
    • Initial release
Credits:
RoacH` - Creator
SA-MP TEAM - For All
Reply
#2

Nice RoacH'
Reply
#3

Good Joob Roach.
Maybe I'll use it on my server to avoid flood of players.
Reply
#4

I will test it if it work fine i will use it !

Nice release !
Reply
#5

Quote:
Originally Posted by bgmrk
Посмотреть сообщение
Nice RoacH'
Quote:
Originally Posted by doodem
Посмотреть сообщение
Good Joob Roach.
Maybe I'll use it on my server to avoid flood of players.
Quote:
Originally Posted by Edvin
Посмотреть сообщение
I will test it if it work fine i will use it !

Nice release !
Thank you !
Reply
#6

Nice include. Tested flood with raksamp (http://code.******.com/p/raksamp/) and it blocks it.
Reply
#7

WOW! Very Nice!
Reply
#8

how to decrease the FLOOD_CONTROL_COMMAND timer? because if I type /help x4 the server kick me...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)