30.11.2015, 11:35
(
Последний раз редактировалось luccagomes15; 01.12.2015 в 12:34.
)
i tryed but its dont work fine, someone can fix it to me?
This is the function
But onplayertext it's detect, send msg to admins, but the IP dont is blocked on MSG
And on /pm its never work
Sorry to my english!
This is the function
Код:
forward AntiDivulga(playerid, msg[]); public AntiDivulga(playerid, msg[]) { new numer[][]={"0","1","2","3","4","5","6","7","8","9"}; for(new i; i < strlen(msg); i++) { if(strlen(msg[i])>4 && strfind(msg[i],".",true) != -1 || strfind(msg[i],":", true)!= -1 || strfind(msg[i],",", true)!= -1 || strfind(msg[i],"-", true)!= -1 || strfind(msg[i],"_", true)!= -1 || strfind(msg[i],"*", true)!= -1 || strfind(msg[i],"'", true)!= -1 || strfind(msg[i],"/", true)!= -1) { for (new x=0; x < 1; x++) { if (strfind(msg[i] , numer[x], true) != -1) { new string[256]; new ipdivulgado[512], ipdocara[128]; GetPlayerIp(playerid,ipdocara,128); format(ipdivulgado, 256, "%s", msg); format(string,sizeof(string),"[AUTO-KICK] (%s) %s disclosing another server: %s", ipdocara, PlayerName(playerid), ipdivulgado); ABroadCast(COLOR_LIGHTGREEN,string,1); writeLog("LOGS/divulgou.txt",string); Kick(playerid); return 0; } } } } return 1; }
Код:
public OnPlayerText(playerid, text[]) { AntiDivulga(playerid, text); new string[128]; format(string, sizeof(string), "%s(ID:%i): %s", PlayerName(playerid), playerid, text); ProxDetector(20.0, playerid,string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT && morto[playerid] == 0) { ApplyAnimation(playerid,"PED","IDLE_CHAT",4.1,0,0,0,1,1); } return 0; }
Код:
CMD:pm(playerid, params[]) { new string[128]; new salvoid; new Mensagem[128]; if(sscanf(params,"us[128]", salvoid, Mensagem)) { SendClientMessage(playerid, -1, "Use: /pm [id] [text]"); return 1; } format(string, sizeof(string), "(PM)(E) %s [%d] %s", PlayerName(salvoid),salvoid,Mensagem); SendClientMessage(playerid, COLOR_YELLOW, string); format(string, sizeof(string), "(PM)® %s [%d] %s", PlayerName(playerid),playerid,Mensagem); SendClientMessage(salvoid, COLOR_YELLOW, string); PlayerPlaySound(playerid, 3600, 0.0, 0.0, 0.0); PlayerPlaySound(salvoid, 1085, 0.0, 0.0, 0.0); return 1; }