SA-MP Forums Archive
[Ajuda] Mensagem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Mensagem (/showthread.php?tid=632066)



Mensagem - iName - 08.04.2017

galera, eu vi em um server que a pessoa escrevia HACKER e aparecia uma mensagem tipo: viu um hacker? use /report id reason

alguem sabe como faзo para por isso


Re: Mensagem - Luiiiz - 08.04.2017

https://sampwiki.blast.hk/wiki/Random_Messages


Re: Mensagem - iName - 08.04.2017

Quote:
Originally Posted by Luiiiz
Посмотреть сообщение
n й random messages, a pessoa escreve tipo: HACKER e ja aparece a mensagem: use /report id motivo


Re: Mensagem - renatog - 08.04.2017

Use a funзгo strfind na callback OnPlayerText pra achar a palavra hacker e aн da um SendClientMessage
https://sampwiki.blast.hk/wiki/Strfind


Re: Mensagem - iName - 08.04.2017

Quote:
Originally Posted by renatog
Посмотреть сообщение
Use a funзгo strfind na callback OnPlayerText pra achar a palavra hacker e aн da um SendClientMessage
https://sampwiki.blast.hk/wiki/Strfind
vlw


Re: Mensagem - iName - 08.04.2017

Quote:
Originally Posted by renatog
Посмотреть сообщение
Use a funзгo strfind na callback OnPlayerText pra achar a palavra hacker e aн da um SendClientMessage
https://sampwiki.blast.hk/wiki/Strfind
eu mudei a palavra

Код:
if(strfind("Hacker", "hack", true) != -1) //returns 4, because the start of 'you' (y) is at index 4 in the string
{
    SendClientMessageToAll(0xFFFF0000, "VIU UM HACKER?  USE /REPORT ID E O MOTIVO.");
}
mas quando eu falo algo no xat, fica enviando essa mensagem ai


Re: Mensagem - DarkBr - 08.04.2017

kkkkk tenta isso

Код:
public OnPlayerText(playerid, text[])
{
    if(strfind(text, "hack", true) != -1 || strfind(text, "hack lixo", true) != -1)
    {
           SendClientMessage(playerid, -1, "viu um hacker? use /report id reason");
    }
    return 1;
}



Re: Mensagem - iName - 08.04.2017

Quote:
Originally Posted by DarkBr
Посмотреть сообщение
kkkkk tenta isso

Код:
public OnPlayerText(playerid, text[])
{
    if(strfind(text, "hack", true) != -1 || strfind(text, "hack lixo", true) != -1)
    {
           SendClientMessage(playerid, -1, "viu um hacker? use /report id reason");
    }
    return 1;
}
---> http://i.imgur.com/MoZqUdW.png


Re: Mensagem - DarkBr - 09.04.2017

Quote:
Originally Posted by iName
Посмотреть сообщение
Desculpa o erro era o return 1; que й = Existe/FingeExistir deixar passar a mensagem
O Certo й return 0; = nгo existe bloquear!

ai :



copia esse code aqui, porquк tem outras coisas atualizadas!

Код:
if(strfind(text, "hack", true) != 1 || strfind(text, "hack lixo", true) != 1)//
{
	SendClientMessage(playerid, -1, "viu um hacker? use /report id reason");
	return 0;//aqui agora ta certo!
}



Re: Mensagem - iName - 09.04.2017

Quote:
Originally Posted by DarkBr
Посмотреть сообщение
Desculpa o erro era o return 1; que й = Existe/FingeExistir deixar passar a mensagem
O Certo й return 0; = nгo existe bloquear!

ai :http://imgur.com/a/xWFp4

copia esse code aqui, porquк tem outras coisas atualizadas!

Код:
if(strfind(text, "hack", true) != 1 || strfind(text, "hack lixo", true) != 1)//
{
	SendClientMessage(playerid, -1, "viu um hacker? use /report id reason");
	return 0;//aqui agora ta certo!
}
mesmo error, mas pode deixar, vlw