Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Filterscript by Spectro_Script
- //FS No Flood || Nao Retire os creditos ||
- //By : Spectro_BR
- #include <a_samp>
- new IsFlooding[MAX_PLAYERS];
- new Flooder[MAX_PLAYERS];
- new szPlayerChatMsg[MAX_PLAYERS][128];
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" FilterScript No-Flood BY: Spectro_BR");
- print("--------------------------------------\n");
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- if(Flooder[playerid] == 1)
- {
- SendClientMessage(playerid, -1, "{FF0000}[ERRO]{FFFFFF} Você está calado e não pode usar o chat !");
- return 0;
- }
- IsFlooding[playerid]++;
- if(!IsPlayerAdmin(playerid))
- {
- if(strlen(text) == strlen(szPlayerChatMsg[playerid]) && !strcmp(szPlayerChatMsg[playerid], text, false))
- {
- SendClientMessage(playerid, -1, "{FF0000}[ERRO]{FFFFFF} Não repita a mesma mensagem!");
- format(szPlayerChatMsg[playerid], 128, "%s", text);
- return 0;
- }
- }
- if(IsFlooding[playerid] >= 3)
- {
- IsFlooding[playerid] = 0;
- Flooder[playerid] = 1;
- SendClientMessage(playerid, -1, "{FF0000}[INFO]{FFFFFF} Você foi calado por 1 minuto. Motivo: Flood !");
- SetTimerEx("LiberarChat", 60000, false, "i", playerid);
- return 0;
- }
- else
- {
- SetTimerEx("SemFlood", 2000, false, "i", playerid);
- }
- return 1;
- }
- forward SemFlood(playerid);
- public SemFlood(playerid)
- {
- IsFlooding[playerid] = 0;
- return 1;
- }
- forward LiberarChat(playerid);
- public LiberarChat(playerid)
- {
- Flooder[playerid] = 0;
- SendClientMessage(playerid, -1, "Você foi descalado, não faça mais flood !");
- return 1;
- }
- // Não retire os creditos Criador: Spectro_BR
- //Nao retire os creditos
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement