Jump to content

Help me guys with caps warning script:(


ImJohnMclane

Recommended Posts

Posted

Can you fix it guys?:(

on *:SIGNAL:mta.text:{ 
 if (($calc($len($3-) - $len($removecs($3-,A,B,C,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,Y,Z))) >= $calc($len($3-) * 0.5)) && ($len($3-) >= 5)) { 
   mta.say $1 Warning $mta.name($1,$2) for caps.. Warnings: 2/1
   mta.warn 
 } 
else { 
 if (($calc($len($3-) - $len($removecs($3-,A,B,C,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,Y,Z))) >= $calc($len($3-) * 0.5)) && ($len($3-) >= 5)) { 
   mta.say $1 Kicking $mta.name($1,$2) for caps.. Final Warning. 2/2
   mta.kick $1 $3 

Ty, :D

Posted

Don't create 2 same topics!

on *:SIGNAL:mta.text:{
 if ($len($3-) > 12) && ($calc($len($3-) - $len($removecs($3-,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z))) >= $calc($len($3-) * 0.7)) {
   !writeini " $mta.dir $+ $1.ini" warnings ID $+ $2 $calc($readini($mta.dir $+ $1.ini,warnings,ID $+ $2) + 1)
   var %a = $readini($mta.dir $+ $1.ini,warnings,ID $+ $2)
   if (%a >= 3) {
     mta.say $1 $mta.name($1,$2) reached the warnings limit and will be kicked! (Too much caps used)
     mta.kick $1 $2
   }
   else mta.say $1 $mta.name($1,$2) has been warned! $calc(3 - %a) more $iif($calc(3 - %a) == 1,warning,warnings) and he will be kicked! (Too much caps used)
 }
}

Do not PM me, im not going to read it anyway.

Posted
Don't create 2 same topics!

on *:SIGNAL:mta.text:{
 if ($len($3-) > 12) && ($calc($len($3-) - $len($removecs($3-,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z))) >= $calc($len($3-) * 0.7)) {
   !writeini " $mta.dir $+ $1.ini" warnings ID $+ $2 $calc($readini($mta.dir $+ $1.ini,warnings,ID $+ $2) + 1)
   var %a = $readini($mta.dir $+ $1.ini,warnings,ID $+ $2)
   if (%a >= 3) {
     mta.say $1 $mta.name($1,$2) reached the warnings limit and will be kicked! (Too much caps used)
     mta.kick $1 $2
   }
   else mta.say $1 $mta.name($1,$2) has been warned! $calc(3 - %a) more $iif($calc(3 - %a) == 1,warning,warnings) and he will be kicked! (Too much caps used)
 }
}

tyyyyyyyyyyy !!:D:D:D:D:D:D:D:D ok :) I maked 2 topics gos i wanted to advertise that lol :lol:

Posted

Cool ..

would the mta:sa version be the same but just mta.say = mta.text

i tried that plus change kick to mute , but didnt get it to work instantly :oops:

coz_sig_oob.png

Server Blog | Server quickinfo

STFU and dont bug the mta team with ''when is DM comming''

or risk theyre spending more time explaining they're still working on DM than actually getting work done :shock:

Posted
Cool ..

would the mta:sa version be the same but just mta.say = mta.text

i tried that plus change kick to mute , but didnt get it to work instantly :oops:

not sure how mtama for sa saves player's info, but yeh that must work if u change to mta.text. This example above checks for 70% of caps, so if u have text like 'I O W N Y O U A L L' it wont kick. you can always change the percentage tho ;) (that * 0.7 = 70%)

Do not PM me, im not going to read it anyway.

Posted
Cool ..

would the mta:sa version be the same but just mta.say = mta.text

i tried that plus change kick to mute , but didnt get it to work instantly :oops:

not sure how mtama for sa saves player's info, but yeh that must work if u change to mta.text. This example above checks for 70% of caps, so if u have text like 'I O W N Y O U A L L' it wont kick. you can always change the percentage tho ;) (that * 0.7 = 70%)

today, that script what u maded, thats not work . can u fix it?

Posted

oh yeh, i put the read/write ini wrong (damn i always do mistakes :x )

on *:SIGNAL:mta.text:{
 if ($len($3-) > 10) && ($calc($len($3-) - $len($removecs($3-,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z))) >= $calc($len($3-) * 0.7)) {
   !writeini -n $+(",$mta.dir,$1.ini,") ID $+ $2 warnings $calc($readini($mta.dir $+ $1.ini,ID $+ $2,warnings) + 1)
   var %a = $readini($mta.dir $+ $1.ini,ID $+ $2,warnings)
   if (%a >= 3) {
     mta.say $1 $mta.name($1,$2) reached the warnings limit and will be kicked! (Too much caps used)
     mta.kick $1 $2
   }
   else mta.say $1 $mta.name($1,$2) has been warned! $calc(3 - %a) more $iif($calc(3 - %a) == 1,warning,warnings) and he will be kicked! (Too much caps used)
 }
}

Do not PM me, im not going to read it anyway.

Posted

on *:SIGNAL:mta.text:{
 if ($len($3-) > 10) && ($calc($len($3-) - $len($removecs($3-,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z))) >= $calc($len($3-) * 0.7)) {
   !writeini -n " $+ $scriptdir $+ 2.ini" ID $mta.nick($1,$2) $calc($readini($scriptdir $+ 2.ini,ID $mta.nick($1,$2),warnings) + 1)
   var %a = $readini($scriptdir $+ 2.ini,ID $mta.nick($1,$2),warnings)
   if (%a >= 3) {
     mta.pm $1 $mta.nick($1,$2) reached the warnings limit and will be kicked! (Too much caps used)
     mta.kick $mta.nick($1,$2)
   }
   else mta.pm $1 $mta.nick($1,$2) has been warned! $calc(3 - %a) more $iif($calc(3 - %a) == 1,warning,warnings) and he will be kicked! (Too much caps used)
 }
}

anticapsvn6.th.jpg

Can u fix this plz.

thx.

Posted
on *:SIGNAL:mta.text:{
 if ($len($3-) > 10) && ($calc($len($3-) - $len($removecs($3-,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z))) >= $calc($len($3-) * 0.7)) {
   !writeini -n $+(",$mta.dir,$1.ini,") $2 warnings $calc($readini($mta.dir $+ $1.ini,$2,warnings) + 1)
   var %a = $readini($mta.dir $+ $1.ini,$2,warnings)
   if (%a >= 3) {
     mta.text $1 $mta.nick($1,$2) reached the warnings limit and will be kicked! (Too much caps used)
     mta.kick $1 $2
   }
   else mta.text $1 $mta.nick($1,$2) has been warned! $calc(3 - %a) more $iif($calc(3 - %a) == 1,warning,warnings) and he will be kicked! (Too much caps used)
 }
}

Do not PM me, im not going to read it anyway.

  • 2 weeks later...
Posted
thanks lil, btw, is it also possible to make it work with less than 10 characters?

of course, just change the number to any you want here:

if ($len($3-) > 10) && ...

Do not PM me, im not going to read it anyway.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...