.
| Name | Parameters | Function |
| FLOOD_CONTROL_DEATH | N/A | Flood death spam, fake kill |
| FLOOD_CONTROL_BOOT | N/A | Flood boot |
| FLOOD_CONTROL_VEHICLES | N/A | Flood vehicles(Car mass spawner) |
| FLOOD_CONTROL_COMMAND | N/A | Flood command |
| FLOOD_CONTROL_CHAT | N/A | Flood chat |
| OnPlayerFloodControl | (playerid, config) | Control panel |
| OnPlayerFloodChat@Command | (playerid, config) | Panel of flood chat/commands |
#include <a_samp>
#include <FloodControl>
public OnPlayerFloodControl(playerid, config) {
if(config == FLOOD_CONTROL_DEATH) {
SendClientMessage(playerid, 0xFFFFFFFF, "FloodControl: You have been banned for flood death!");
Ban(playerid);
}
if(config == FLOOD_CONTROL_BOOT) {
SendClientMessage(playerid, 0xFFFFFFFF, "FloodControl: You have been banned for flood boot!");
Ban(playerid);
}
if(config == FLOOD_CONTROL_VEHICLES) {
SendClientMessage(playerid, 0xFFFFFFFF, "FloodControl: You have been banned for flood vehicle! (CAR MASS SPAWNER)");
Ban(playerid);
}
if(config == FLOOD_CONTROL_CHAT || FLOOD_CONTROL_COMMAND) {
SendClientMessage(playerid, 0xFFFFFFFF, "FloodControl: You were kicked by flood chat/command!");
Kick(playerid);
}
return true;
}
public OnPlayerText(playerid, text[]) {
// -- Starts counting --
OnPlayerFloodChat@Command(playerid, FLOOD_CONTROL_CHAT);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[]) {
// -- Starts counting --
OnPlayerFloodChat@Command(playerid, FLOOD_CONTROL_COMMAND);
if(!strcmp(cmdtext, "/floodcontrol", true)) {
SendClientMessage(playerid, 0xFFFFFFFF, "FloodControl: You can be kicked by flood!");
return 1;
}
return 0;
}
if it work fine i will use it ! |
Good Joob Roach.
Maybe I'll use it on my server to avoid flood of players. |
!