Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- //~~~~~~~~~~~~~~~~~~
- forward TaCalado();
- forward FoiAvisado();
- //~~~~~~~~~~~~~~~~~~
- static TempoChat[MAX_PLAYERS];
- static ChatMsg[MAX_PLAYERS][128];
- //~~~~~~~~~~~~~~~~~~
- new PlCalado[MAX_PLAYERS]= 0;
- new TAviso[MAX_PLAYERS]= 0;
- new nomedele[MAX_PLAYER_NAME];
- //~~~~~~~~~~~~~~~~~~
- public OnFilterScriptInit()
- {
- print("\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- print("~ FilterScript Ant-Flood Carregado Com Sucesso ~");
- print("~ By: .:: [LF]PlaYer ::. ");
- print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n");
- SetTimer("TaCalado", 40000, 1);
- SetTimer("FoiAvisado", 2000, 1);
- return 1;
- }
- public OnFilterScriptExit()
- {
- print("\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- print("~ FilterScript Ant-Flood Descarregado Com Sucesso ~");
- print("~ By: .:: [LF]PlaYer ::. ");
- print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n");
- return 1;
- }
- stock FazendoFlood(playerid)
- {
- if(GetTickCount() - TempoChat[playerid] < 2000)
- return 1;
- return 0;
- }
- public OnPlayerText(playerid, text[])
- {
- if(PlCalado[playerid] == 1)
- {
- SendClientMessage(playerid, 0x12900BBF, "[x] Você não pode falar pois foi Calado - [Motivo: Flood]!");
- return 0;
- }
- if(TAviso[playerid] == 1)
- {
- new string[222];
- GetPlayerName(playerid, nomedele, MAX_PLAYER_NAME);
- format(string, sizeof(string), "[x] - [LF]PlaYer calou o jogador %s - [Motivo: Flood].", nomedele);
- SendClientMessageToAll(0x12900BBF,string);
- PlCalado[playerid]= 1;
- TAviso[playerid]= 0;
- return 0;
- }
- if(FazendoFlood(playerid) && !IsPlayerAdmin(playerid))
- {
- GetPlayerName(playerid, nomedele, MAX_PLAYER_NAME);
- SendClientMessage(playerid, 0xFFFF00AA, "(~) Pare de fazer flood ou você vai ser Calado!!");
- TAviso[playerid]= 1;
- return 0;
- }
- if(!IsPlayerAdmin(playerid))
- {
- if(strlen(text) == strlen(ChatMsg[playerid]) && !strcmp(ChatMsg[playerid], text, false))
- {
- SendClientMessage(playerid, 0xAA3333AA, "[x] - Não repita esta mensagen.");
- format(ChatMsg[playerid], 128, "%s", text);
- return 0;
- }
- }
- format(ChatMsg[playerid], 128, "%s", text);
- TempoChat[playerid] = GetTickCount();
- return 1;
- }
- public TaCalado(){
- for(new pl=0;pl<MAX_PLAYERS;pl++){
- if(IsPlayerConnected(pl)){
- if(PlCalado[pl] == 1){
- PlCalado[pl]= 0;
- SendClientMessage(pl, 0x9955DEEE, "(~) Você foi descalado, não faça mais flood.");
- }
- }
- }
- }
- public FoiAvisado(){
- for(new pl=0;pl<MAX_PLAYERS;pl++){
- if(IsPlayerConnected(pl)){
- if(TAviso[pl] == 1){
- TAviso[pl]= 0;
- }
- }
- }
- }
- /*
- .:: Criado Por ::.
- .:: [LF]PlaYer/BlackSky ::.
- */
Advertisement
Add Comment
Please, Sign In to add comment