• Welcome to Vice City Multiplayer.
 

[RESOLVED]Bad language

Started by thijn, June 24, 2008, 12:44:22 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

thijn

How can i auto warn someone who says fuck or something else what's not allowed??
can someone help me??


VRocker

#1
Cant give you the exact code without knowing what base script your using... But heres the main part you need:

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


thijn

ok thanks,
what means findtok?


Mattz

Meaning for $findtok from mirc

$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.


thijn

sorry but it doesn't work.
I'm using GUS, can someone help me??


thijn

plzz can someone help me????


AdTec_224

UNTESTED!

Find:

on *:SIGNAL:vcmp.text:{

Directly below add:

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:

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

thijn

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:




thijn

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!
}


GTA-Roloboy

Quote  elseif (fuck isin $2) || (*fuck* iswm $2) vcmp.warn $vcmp.getid($left($1,-1)) Server Using bad language
Better...

thijn