Vice City Multiplayer

VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: thijn on June 24, 2008, 02:44:22 pm

Title: [RESOLVED]Bad language
Post by: thijn on June 24, 2008, 02:44:22 pm
How can i auto warn someone who says fuck or something else what's not allowed??
can someone help me??
Title: Re: Bad language
Post by: VRocker on June 24, 2008, 03:19:45 pm
Cant give you the exact code without knowing what base script your using... But heres the main part you need:

Code: [Select]
if ( $findtok( fuck shit bastard, $2-, 1, 32 ) ; Warn User
$2- would be the whatever the player said. In my scripts it would be $3- under vcmp.chat.
Sorry i cant give you the code for the other scripts, havn't got access to their signals/parameters right now (Somebody wanna grab them for me? :))

More words can be added by seperating each 'bad word' with a space
Title: Re: Bad language
Post by: thijn on June 24, 2008, 07:15:57 pm
ok thanks,
what means findtok?
Title: Re: Bad language
Post by: Mattz on June 24, 2008, 07:46:15 pm
Meaning for $findtok from mirc

Code: [Select]
$findtok(text,token,N,C)

Returns the position of the Nth matching token in text.

 

$findtok(a.b.c.d,c,1,46)        returns 3

$findtok(a.b.c.d,e,1,46)        returns $null

 

If you specify zero for N, it returns the total number of matching tokens.

 

Note: $findtokcs() is the case-sensitive version.
Title: Re: Bad language
Post by: thijn on June 24, 2008, 09:11:39 pm
sorry but it doesn't work.
I'm using GUS, can someone help me??
Title: Re: Bad language
Post by: thijn on June 27, 2008, 04:45:13 pm
plzz can someone help me????
Title: Re: Bad language
Post by: AdTec_224 on June 27, 2008, 06:12:09 pm
UNTESTED!

Find:

Code: [Select]
on *:SIGNAL:vcmp.text:{
Directly below add:

Code: [Select]
if ($findtok(fuck shit bastard,$2-,1,32)) vcmp.warn $vcmp.getid(%name) Autowarn Using bad language
Or create a new blank script file and add:

Code: [Select]
on *:SIGNAL:vcmp.text:{
  var %name = $left($1,-1)
  if ($findtok(fuck shit bastard,$2-,1,32)) vcmp.warn $vcmp.getid(%name) Autowarn Using bad language
}

Hope that helps

-AdTec_224
Title: Re: Bad language
Post by: thijn on June 29, 2008, 12:54:18 pm
it helped a lot, but i have only one problem: If i say only "fuck" it warn, when i say "fack u" it doesn't warn??
Screen:
(http://img362.imageshack.us/img362/6872/screenba1.png)

(http://img300.imageshack.us/img300/4391/screeniefn7.png)
Title: Re: Bad language
Post by: thijn on June 29, 2008, 01:05:31 pm
i've done it myself:
Quote
on *:SIGNAL:vcmp.text:{
if ($findtok(fuck shit bastard,$2-,1,32)) vcmp.warn $vcmp.getid(%name) Autowarn Using bad language
  var %name = $left($1,-1)

  vcmp.check.timer %name
  vcmp.check.spam %name

  echo -a 14 $+ %name $+ : $2- $+ 

  if ($2 == brb) vcmp.say %name will Be Right Back! Reason: $iif($3-,$v1,None)
  elseif ($2 == bbs) vcmp.say %name will Be Back Soon! Reason: $iif($3-,$v1,None)
  elseif ($2 == bbl) vcmp.say %name will Be Back Later! Reason: $iif($3-,$v1,None)
  elseif ($2 == fuck) vcmp.warn $vcmp.getid(%name) Server Using bad language
  elseif (($2 == back) && ($3- == $null)) vcmp.say %name is Back!
}
Title: Re: [RESOLVED]Bad language
Post by: GTA-Roloboy on June 29, 2008, 04:36:58 pm
Quote
  elseif (fuck isin $2) || (*fuck* iswm $2) vcmp.warn $vcmp.getid($left($1,-1)) Server Using bad language
Better...
Title: Re: [RESOLVED]Bad language
Post by: thijn on June 29, 2008, 05:32:54 pm
thanks