Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* tec_AntFlood v1.0 by tecsites tslimite.blogspot.com
- Não retire os credito
- */
- #include <a_samp>
- #define tempo 2
- new flood[MAX_PLAYERS];
- new playerflood[MAX_PLAYERS];
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" tec_AntFlood by tecsites tslimite.blogspot.com" );
- print("--------------------------------------\n");
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- SendClientMessage(playerid,-1,"tec_AntFlood by Tecsites tslimite.blogspot.com");
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- flood[playerid] = 0;
- playerflood[playerid] = 0;
- return 1;
- }
- forward antflood(playerid);
- public antflood(playerid){
- flood[playerid] = 0;
- playerflood[playerid] = 0;
- }
- public OnPlayerText(playerid, text[])
- {
- flood[playerid]++;
- if(flood[playerid] >= 2 && flood[playerid] <= 19){
- if(playerflood[playerid] == 0){
- playerflood[playerid] = 1;
- SetTimerEx("antflood",1000 * tempo,false,"flood",playerid);
- }
- new string[55];
- format(string,sizeof(string),"AntFlood:Voce so pode mandar cada mensagem em %d segundos",tempo);
- SendClientMessage(playerid,-1,string);
- return 0;
- }else if(flood[playerid] >= 20){
- SendClientMessage(playerid,-1,"Banido por usar Cheats-flood");
- Ban(playerid);}
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment