[Ajuda] Meu sistema anti palavrгo '-' - 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] Meu sistema anti palavrгo '-' (
/showthread.php?tid=360258)
Meu sistema anti palavrгo '-' -
Mercurio - 17.07.2012
Olб boa noite, meu sistema anti palavrгo nгo funciona do jeito que eu quero

O sistema funciona de boa, mas o problema й que quando um player digita o palavreado definido, sу й punido se a palavra for a primeira da frase...
Exemplo;
'FDM', se o player digitar "fdm meu carro" ele й punido.
Agora se ele digitar "meu carro fdm" ele nгo й punido e.e
Alguйm da um help por favor?
Re: Meu sistema anti palavrгo '-' -
ViniBorn - 17.07.2012
Use strfind
Re: Meu sistema anti palavrгo '-' -
Mercurio - 17.07.2012
Mas no caso?
pawn Код:
if(strfind(tmp, "?", true) != 1)
Re: Meu sistema anti palavrгo '-' -
Dolby - 17.07.2012
pawn Код:
if(!strfind(text, Badwords[Z], false))
Re: Meu sistema anti palavrгo '-' -
Mercurio - 17.07.2012
Quote:
Originally Posted by Gustavo_Araujo
pawn Код:
if(!strfind(text, Badwords[Z], false))
|
Ok, irei testar.
@Edit
Nгo funfou
Re: Meu sistema anti palavrгo '-' -
Victor' - 17.07.2012
pawn Код:
static BadWords[][] =
{
"fdm","n0ob"
};
pawn Код:
for(new Z; Z < strlen(text); Z++)
{
if(!strfind(text, Badwords[Z], false))
{
Re: Meu sistema anti palavrгo '-' -
Mercurio - 17.07.2012
Quote:
Originally Posted by Victor'
pawn Код:
static BadWords[][] = { "fdm","n0ob" };
pawn Код:
for(new Z; Z < strlen(text); Z++) { if(!strfind(text, Badwords[Z], false)) {
|
Fail tambйm '-'
Re: Meu sistema anti palavrгo '-' -
zSuYaNw - 17.07.2012
pawn Код:
for(new Z; Z < sizeof(Badwords); Z++)
{
if(strfind(text, Badwords[Z], true) != -1)
{
Re: Meu sistema anti palavrгo '-' -
Mercurio - 17.07.2012
Quote:
Originally Posted by [Full]Garfield[XDB]
pawn Код:
for(new Z; Z < sizeof(Badwords); Z++) { if(strfind(text, Badwords[Z], true) != -1) {
|
PERFECT
Obrigado, rep+