Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- ==================================================
- |FS By Christian_David |
- |Email: [email protected] |
- | |
- |Defina o IP do Teamspeak e do Servidor Abaixo |
- |Para nao haver conflitos ;) |
- | |
- |caso deseje editar e postar em algum blog |
- |por favor não retirar os creditos originais! |
- ==================================================
- */
- #define TS "127.0.0.1:7878"
- #define SV "127.0.0.1:7777"
- #include <a_samp>
- forward AntiDivulguer(texto[]);
- forward IPDivulguerLog(playerid,string[]);
- public OnPlayerText(playerid,text[])
- {
- new str[256];
- if(AntiDivulguer(text))
- {
- SendClientMessageToAll(0xcc2d2dFF,"===============================");
- format(str,sizeof(str),"%s é Um Noob FDP e n Sabe Divulgar",pNome(playerid));
- SendClientMessageToAll(0x2d78ccFF,str);
- SendClientMessageToAll(0x2d78ccFF,"Ai Vem Divulga Aqui só pra dizer q é bomzão");
- SendClientMessageToAll(0x2d78ccFF,"Toma Um Ban ai fdp pra aprender!");
- SendClientMessageToAll(0x2d78ccFF,"e Volta pro seu server lixo!");
- SendClientMessageToAll(0xcc2d2dFF,"===============================");
- IPDivulguerLog(playerid,text);
- Ban(playerid);
- return 1;
- }
- return 1;
- }
- public AntiDivulguer(texto[])
- {
- new IPTent[4][128],IPTentPort[1][128],ipcompleto[256];
- split(texto,IPTent,'.');
- split(texto,IPTentPort,':');
- format(ipcompleto,sizeof(ipcompleto),"%d.%d.%d.%d:%d",strval(IPTent[0]),strval(IPTent[1]),strval(IPTent[2]),strval(IPTent[3]),strval(IPTentPort[0]));
- if(strval(IPTent[1])>0&&strval(IPTent[2])>0&&strval(IPTent[3])>0&&strcmp(SV,texto,true)==-1&&strcmp(TS,texto,true)==-1)
- {
- return 1;
- }
- return 0;
- }
- stock split(const strsrc[], strdest[][], delimiter)
- {
- new i, li;
- new aNum;
- new len;
- while(i <= strlen(strsrc)){
- if(strsrc[i]==delimiter || i==strlen(strsrc)){
- len = strmid(strdest[aNum], strsrc, li, i, 128);
- strdest[aNum][len] = 0;
- li = i+1;
- aNum++;
- }
- i++;
- }
- return 1;
- }
- stock pNome(playerid)
- {
- new nome[MAX_PLAYER_NAME];
- GetPlayerName(playerid,nome,sizeof(nome));
- return nome;
- }
- public IPDivulguerLog(playerid,string[])
- {
- new entry[128],dia,mes,ano,hora,minuto,segundo;
- gettime(hora,minuto,segundo);
- getdate(ano,mes,dia);
- format(entry, sizeof(entry), "[%s][%d/%d/%d|%d:%d:%d]: %s\n",pNome(playerid),dia,mes,ano,hora,minuto,segundo,string);
- new File:hFile;
- hFile = fopen("ServidoresNbs.log", io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- }
Advertisement
Add Comment
Please, Sign In to add comment