OnPlayerText hmm - 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: OnPlayerText hmm (
/showthread.php?tid=309760)
OnPlayerText hmm -
Twinki1993 - 09.01.2012
How do I make anti swear, I mean I got to the OnPlayerText, but I dont get it how to get like GetPlayerText or something
Re: OnPlayerText hmm -
Tanush123 - 09.01.2012
under onplayertext
pawn Код:
new antiswear[50];
if(strfind(antiswear, "Fuck", true) != -1 || strfind(antiswear, "Bitch", true) != -1)
{
SendClientMessage(playerid,-1,"No swearing sir");
return 0;
}
im not sure if it will work
Re: OnPlayerText hmm -
Twinki1993 - 09.01.2012
Thanks mate, really helpfull!
Re: OnPlayerText hmm -
Tanush123 - 09.01.2012
rep me too please
++
Re: OnPlayerText hmm -
Twinki1993 - 09.01.2012
Yeah, will do
but I didn't explain it good, uhm how do I make it like when you say like "Fuck" it will say "****"
Re: OnPlayerText hmm -
Laronic - 09.01.2012
This might help you (By Ryder`):
http://forum.sa-mp.com/showpost.php?...postcount=1071
Re: OnPlayerText hmm -
Twinki1993 - 09.01.2012
Thanks!
Re: OnPlayerText hmm -
Tanush123 - 09.01.2012
Quote:
Originally Posted by CyberGhost
|
Should had thought of that earlier, good job cyberghost for helping him
Re: OnPlayerText hmm -
Twinki1993 - 09.01.2012
Yeah, but still that ain't helping me. :P
I am getting problem with
Quote:
replaceSwear(text, badWords[i]);
|
It says undefinied symbol :P
C:\Users\Maki\Desktop\server 0.3d\gamemodes\TankDM.pwn(154) : error 017: undefined symbol "replaceSwear"
C:\Users\Maki\Desktop\server 0.3d\gamemodes\TankDM.pwn(15
: error 010: invalid function or declaration
Re: OnPlayerText hmm -
Tanush123 - 09.01.2012
pawn Код:
stock replaceSwear(string[], badWord[], replace = '*')
{
new
i
;
while((i = strfind(string, badWord, true)) != -1)
{
for(new x = (i + strlen(badWord)); i != x; ++i)
{
string[i] = replace;
}
}
return 1;
}