SA-MP Forums Archive
How i add - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How i add (/showthread.php?tid=285944)



How i add - Salsa - 26.09.2011

How i add Bad Words in Server
CensoredWords

Example: when any player type Fuck dick asshole
and Server Say FLAMING NOT ALLOED

How i add forbidwords tell me plz


Re: How i add - [HiC]TheKiller - 26.09.2011

pawn Код:
#include <a_samp>

new BadWords[][] =
{
    "Fuck",
    "Shit",
    "Dick",
    "Cunt"
};

public OnPlayerText(playerid, text[])
{
    for( new x; x< sizeof(BadWords) - 1; x++)
    {
        if(strfind(text, BadWords[x], true) != -1)
        {
            SendClientMessage(playerid, -1, "Don't swear / flame");
            return 0;
        }
    }
    return 1;
}
That should work.


Re: How i add - Salsa - 26.09.2011

help help

Код:
C:\Documents and Settings\Kapil\Desktop\BadFuck.pwn(97) : error 025: function heading differs from prototype
C:\Documents and Settings\Kapil\Desktop\BadFuck.pwn(99) : error 017: undefined symbol "BadWords"
C:\Documents and Settings\Kapil\Desktop\BadFuck.pwn(101) : error 017: undefined symbol "BadWords"
C:\Documents and Settings\Kapil\Desktop\BadFuck.pwn(101) : warning 215: expression has no effect
C:\Documents and Settings\Kapil\Desktop\BadFuck.pwn(101) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Kapil\Desktop\BadFuck.pwn(101) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Kapil\Desktop\BadFuck.pwn(101) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.



Re: How i add - [HiC]TheKiller - 26.09.2011

I wasn't really concentrating when I wrote that, fixed it.


Re: How i add - Salsa - 26.09.2011

add these words in new fs plz


Re: How i add - [bs]_lancer - 26.09.2011

man this is working great xP and guess what ?! im stealing the idea for my server xP


tnx BTW


Re: How i add - Salsa - 26.09.2011

please tell me how i add these words


Re: How i add - [bs]_lancer - 26.09.2011

bro .. i just added it to the script! and everything worked cool!

u can add me on MSN k_reallove_z2008@hotmail.com and i can take a look for u on teamviewer if u want


Re: How i add - BlackStones - 26.09.2011

did you add includes?
pawn Код:
#include <stream>
#include <sscanf2>
#include <a_samp>
#pragma tabsize 0
#pragma unused ret_memcpy



Re: How i add - [bs]_lancer - 26.09.2011

Quote:
Originally Posted by BlackStones
Посмотреть сообщение
did you add includes?
pawn Код:
#include <stream>
#include <sscanf2>
#include <a_samp>
#pragma tabsize 0
#pragma unused ret_memcpy

NONE it works with and without all these includes