prohibit publishers script help
#1

i tryed but its dont work fine, someone can fix it to me?

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;
}
But onplayertext it's detect, send msg to admins, but the IP dont is blocked on MSG
Код:
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;

}
And on /pm its never work
Код:
	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;
    }
Sorry to my english!
Reply
#2

Reply
#3

If you can tell us what it's supposed to do (since the CMD's not in English) in the first place, we might be able to help you.
Reply
#4

Quote:
Originally Posted by Jay_Dixon
Посмотреть сообщение
If you can tell us what it's supposed to do (since the CMD's not in English) in the first place, we might be able to help you.
It is to prohibit other owners servers come into my server to disclose another server

Now i have edited the topic, is better to understand?
Reply
#5

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)