ola denuevo
bueno quien nesesito un fs de anti-flood qien me podria consegir uno eh provado varios pero no tiran error
PHP Code:
#include <a_samp>
#include <utils>
#include "../include/gl_common"
#define ColorFlood 0x24B1DBAA
#define TimerFlood 1500
#define AlertFlood 4
new FloodAlert[MAX_PLAYERS],
FloodTimer[MAX_PLAYERS];
public OnFilterScriptInit()
{
print(", [ON] .");
print("| Sistema Anti Flood |");
print("` By: Dr_Pawno ґ");
return 1;
}
public OnFilterScriptExit()
{
print(", [OFF] .");
print("| Sistema Anti Flood |");
print("` By: Dr_Pawno ґ");
return 1;
}
public OnPlayerConnect(playerid)
{
FloodAlert[playerid] = 0; FloodTimer[playerid] = 0;
SendClientMessage(playerid, ColorFlood, "[Anti-Flood] Este server tem o Anti-Flood do {FFFF00}Dr_Pawno{24B1DB}!");
return 1;
}
public OnPlayerText(playerid, text[])
{
new string[126];
if(GetTickCount() > FloodTimer[playerid])
{
FloodAlert[playerid] = 0;
}
FloodTimer[playerid] = GetTickCount() + TimerFlood;
FloodAlert[playerid] ++;
if(FloodAlert[playerid] > 1 && FloodAlert[playerid] < AlertFlood-1)
{
format(string, sizeof(string), "[Anti-Flood] Vocк tem {FFFF00}%d/%d{24B1DB} avisos.", FloodAlert[playerid], AlertFlood);
SendClientMessage(playerid, ColorFlood, string);
}
else if(FloodAlert[playerid] == AlertFlood-1)
{
format(string, sizeof(string), "[Anti-Flood] Vocк tem {FFFF00}%d/%d{24B1DB} avisos. Mais um e vocк serб Kickado.", FloodAlert[playerid], AlertFlood);
SendClientMessage(playerid, ColorFlood, string);
}
else if(FloodAlert[playerid] == AlertFlood)
{
format(string, sizeof(string), "[Anti-Flood] Vocк tem {FFFF00}%d/%d{24B1DB} avisos. Vocк foi Kickado.", FloodAlert[playerid], AlertFlood);
SendClientMessage(playerid, ColorFlood, string);
Kick(playerid);
new pname[MAX_PLAYER_NAME]; GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "[Anti-Flood] {FFFF00}%s{24B1DB} foi kickado por Flood.", pname);
SendClientMessageToAll(ColorFlood, string);
return 0;
}
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
// New
new comando[126],
string[256],
index,
pname[MAX_PLAYER_NAME];
// Comando
comando = strtok(cmdtext, index);
if(!strcmp("/resetarflood", comando, true))
{
// Nгo й Admin Rcon
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, ColorFlood, "[Anti-Flood] Vocк nгo й Admin RCON.");
// New (Resposta)
new resposta[MAX_PLAYER_NAME];
resposta = strtok(cmdtext, index);
// Sem Resposta
if(!strlen(resposta)) return SendClientMessage(playerid, ColorFlood, "[Anti-Flood] /ResetarFlood [PlayerID/NOME]");
// Definir Resposta Como Jogador
new player = ReturnUser(resposta);
// sizeof Nгo Conectado
if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, ColorFlood, "[Anti-Flood] Jogador Nгo Conectado.");
// Funзхes Do Player
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "[Anti-Flood] {FFFF00}%s{24B1DB} resetou o seu Flood.", pname);
SendClientMessage(player, ColorFlood, string);
FloodAlert[player] = 0;
// Funзхes Do PlayerID
GetPlayerName(player, pname, sizeof(pname));
format(string, sizeof(string), "[Anti-Flood] Vocк resetou o Flood de {FFFF00}%s{24B1DB}.", pname);
SendClientMessage(playerid, ColorFlood, string);
return 1;
}
return 0;
}
ese es el codigo y el error es este
PHP Code:
C:\Users\manchas\Desktop\svr samp\filterscripts\anti-flood.pwn(61) : warning 217: loose indentation
C:\Users\manchas\Desktop\svr samp\filterscripts\anti-flood.pwn(86) : warning 217: loose indentation
C:\Users\manchas\Desktop\svr samp\filterscripts\anti-flood.pwn(87) : warning 217: loose indentation
C:\Users\manchas\Desktop\svr samp\filterscripts\anti-flood.pwn(90) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Warnings.
bueno si algien me ayuda se lo agredeceria