Jump to content

Warn (3x) script for MTA-SA


Keslertje2005

Recommended Posts

Hey mensen.

Ik zoek al heel lang een script waar ik campers mee kan waarschuwen op MTA-SA. Als ik dan !camp doe wilde ik graag dat hij gewaarschuwd zou worden met de tekst. Na 2 keer waarschuwen zou hij dan gekickt moeten worden. Ik heb nu dit script tegen caps:

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

Ik heb geprobeerd hem te configureren naar !camp maar het wil me niet lukken want als ik !camp met mta.nick($1,%a) gaat hij de ID's af van 3 naar 1 volgens mij. Ik hoop dat iemnd een warn script zou kunnen maken zoals hierboven maar dan voor !camp

Alvast heeeeeeeeeel erg bedantk!!!

Link to comment

he wanted a warnings-system for MTA:SA so if he types !camp that they get a kick after 3 times.

lil Toady already scripted something like that for me:

works only with GUS:

Alias:

alias gus.warnings !return $iif($readini($scriptdir $+ warnings.ini,WARNINGS,$mta.nick($1,$2)),$v1,0)

Command:

elseif (!givewarning* iswm $3) {
 if ($gus.level($1,$2) >= 10) {
   if (%a == -1) mta.pm $1 $2 Error - Absent ID
   else {
     !writeini -n " $+ $scriptdir $+ warnings.ini" WARNINGS $mta.nick($1,%a) $calc($gus.warnings($1,%a)+1)
     if ($gus.warnings($1,%a) >= 3) {
       mta.text $1 $mta.nick($1,%a) has reached the warnings limit and will be banned!
       mta.ban $1 %a
     }
     else mta.text $1 $mta.nick($1,%a) has got a warning! $calc(3-$gus.warnings($1,%a)) more warnings and he will be banned.
   }
 }
}

Link to comment

OMG How stupid, I'll retyp it in english:

I'm searchin a very long time for a script where I can warn campers with on MTA-SA. So when I do !camp that player will get warned with a text. He should be kicked after 2 warnings. Ive got this script from lil (working perfect!!! Thanks lil!!):

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

I tryed to edit it to !camp but it didnt work because when I do !camp with mta.nick($1,a%) it is warning from ID 3 to ID 1 i thought. I hope someone could edit this script to a warn script for me like the script above but than for !camp

Really really really many thanks!!!

Link to comment
he wanted a warnings-system for MTA:SA so if he types !camp that they get a kick after 3 times.

lil Toady already scripted something like that for me:

works only with GUS:

Alias:

alias gus.warnings !return $iif($readini($scriptdir $+ warnings.ini,WARNINGS,$mta.nick($1,$2)),$v1,0)

Command:

elseif (!givewarning* iswm $3) {
 if ($gus.level($1,$2) >= 10) {
   if (%a == -1) mta.pm $1 $2 Error - Absent ID
   else {
     !writeini -n " $+ $scriptdir $+ warnings.ini" WARNINGS $mta.nick($1,%a) $calc($gus.warnings($1,%a)+1)
     if ($gus.warnings($1,%a) >= 3) {
       mta.text $1 $mta.nick($1,%a) has reached the warnings limit and will be banned!
       mta.ban $1 %a
     }
     else mta.text $1 $mta.nick($1,%a) has got a warning! $calc(3-$gus.warnings($1,%a)) more warnings and he will be banned.
   }
 }
}

Its working! Your are the best! THANKS!!

Link to comment
  elseif ($3 == !givewarning) {
   if ($gus.level($1,$2) >= 10) {
     if (%a == -1) mta.pm $1 $2 Error - Absent ID
     else {
       !writeini -n " $+ $scriptdir $+ warnings.ini" WARNINGS $mta.nick($1,%a) $calc($gus.warnings($1,%a)+1)
       if ($gus.warnings($1,%a) >= 3) {
         mta.text $1 $mta.nick($1,%a) has reached the warnings limit and will be kicked!
         mta.kick $1 %a
         !writeini -n " $+ $scriptdir $+ warnings.ini" WARNINGS $mta.nick($1,%a) 0
       }
       else mta.text $1 $mta.nick($1,%a) has got a warning! $calc(3-$gus.warnings($1,%a)) more warnings and he will be banned.
     }
   }
 }

Link to comment

here, works with gus (or without it, just add a var %a that finds a player id), commands:

!afk - warnings for being away from kb

!bl - bad language

!camp - camping

all the warnings are saved in diff places :P

on *:SIGNAL:mta.command:{
 if ($3 == !afk) || ($3 == !camp) || ($3 == !bl) {
   if ($gus.level($1,$2) >= 5) {
     if (%a == -1) mta.pm $1 $2 Error - Absent ID
     else gus.giveawarning $1 %a $right($3,-1)
   }
 }
}
alias gus.giveawarning {
 !writeini -n " $+ $scriptdir $+ warnings.ini" $3 $mta.nick($1,$2) $calc($readini($scriptdir $+ warnings.ini,$3,$mta.nick($1,$2))+1)
 if ($readini($scriptdir $+ warnings.ini,$3,$mta.nick($1,$2)) >= 2) {
   mta.text $1 $mta.nick($1,$2) has reached the warnings limit and will be kicked!
   mta.kick $1 $2
   !remini " $+ $scriptdir $+ warnings.ini" $3 $mta.nick($1,$2)
 }
 else mta.text $1 $mta.nick($1,$2) has got a warning for $iif($3 == afk,being away from keyboard,$iif($3 == camp,camping,bad language)) $+! $calc(2-$readini($scriptdir $+ warnings.ini,$3,$mta.nick($1,$2))) more warnings and he will be kicked.
}

you can add as much commands as you want there under mta.command signal :P

P.S: haven't tested it, i don't have a mta:sa server to test scripts on

Edited by Guest
Link to comment

Beta, please help :P

  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 muted for 1 minute! (Too much caps used) 
     !writeini -n " $+ $scriptdir $+ $1.ini" WARNINGS $mta.nick($1,$2) 0  
     !.timer 1 3 mta.mute $1 $2   
     !.timer 1 63 mta.unmute $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 you will be muted for 1 minute! (Too much caps used) 
 } 

This is the whole command, but it wont delete the warnings... Thanks

Link to comment
here, works with gus (or without it, just add a var %a that finds a player id), commands:

!afk - warnings for being away from kb

!bl - bad language

!camp - camping

all the warnings are saved in diff places :P

on *:SIGNAL:mta.command:{
 if ($3 == !afk) || ($3 == !camp) || ($3 == !bl) {
   if ($gus.level($1,$2) >= 5) {
     if (%a == -1) mta.pm $1 $2 Error - Absent ID
     else gus.giveawarning $1 %a $right($3,-1)
   }
 }
}
alias gus.giveawarning {
 !writeini -n " $+ $scriptdir $+ warnings.ini" $3 $mta.nick($1,$2) $calc($readini($scriptdir $+ warnings.ini,$3,$mta.nick($1,$2))+1)
 if ($readini($scriptdir $+ warnings.ini,$3,$mta.nick($1,$2)) >= 2) {
   mta.text $1 $mta.nick($1,$2) has reached the warnings limit and will be kicked!
   mta.kick $1 $2
   !remini " $+ $scriptdir $+ warnings.ini" $3 $mta.nick($1,$2)
 }
 else mta.text $1 $mta.nick($1,$2) has got a warning for $iif($3 == afk,being away from keyboard,$iif($3 == camp,camping,bad language)) $+! $calc(2-$readini($scriptdir $+ warnings.ini,$3,$mta.nick($1,$2))) more warnings and he will be kicked.
}

you can add as much commands as you want there under mta.command signal :P

P.S: haven't tested it, i don't have a mta:sa server to test scripts on

Hey there,

I just tried this script there and i cant get it working.

I just copied it and made a .MRC file the loaded it but it just wont work lol

Any ideas?

Cheers in advance.

Link to comment
i think you need to load it in mtagus yeah, all my own scripts are in the mtagus file so that could be the problem

ok well i stuck it in there but still no joy.

Do you have it working?

EDIT:- in Lil Toadys post he wrote this..here, works with gus (or without it, just add a var %a that finds a player id)

is this maybe why its not working as i dont have a line like that in my script.

Also how would i do that.

Cheers :D

Link to comment
on *:SIGNAL:mta.command:{
var %a = $iif($4,$iif($mta.nick($1,$4) != $null,$4,$gus.getid($1,$4)),$2)
 if ($3 == !afk) || ($3 == !camp) || ($3 == !bl) {
   if (%a == -1) mta.pm $1 $2 Error - Absent ID
   else gus.giveawarning $1 %a $right($3,-1)
 }
}
alias gus.giveawarning {
 !writeini -n " $+ $scriptdir $+ warnings.ini" $3 $mta.nick($1,$2) $calc($readini($scriptdir $+ warnings.ini,$3,$mta.nick($1,$2))+1)
 if ($readini($scriptdir $+ warnings.ini,$3,$mta.nick($1,$2)) >= 2) {
   mta.text $1 $mta.nick($1,$2) has reached the warnings limit and will be kicked!
   mta.kick $1 $2
   !remini " $+ $scriptdir $+ warnings.ini" $3 $mta.nick($1,$2)
 }
 else mta.text $1 $mta.nick($1,$2) has got a warning for $iif($3 == afk,being away from keyboard,$iif($3 == camp,camping,bad language)) $+! $calc(2-$readini($scriptdir $+ warnings.ini,$3,$mta.nick($1,$2))) more warnings and he will be kicked.
}

Link to comment
on *:SIGNAL:mta.command:{
var %a = $iif($4,$iif($mta.nick($1,$4) != $null,$4,$gus.getid($1,$4)),$2)
 if ($3 == !afk) || ($3 == !camp) || ($3 == !bl) {
   if (%a == -1) mta.pm $1 $2 Error - Absent ID
   else gus.giveawarning $1 %a $right($3,-1)
 }
}
alias gus.giveawarning {
 !writeini -n " $+ $scriptdir $+ warnings.ini" $3 $mta.nick($1,$2) $calc($readini($scriptdir $+ warnings.ini,$3,$mta.nick($1,$2))+1)
 if ($readini($scriptdir $+ warnings.ini,$3,$mta.nick($1,$2)) >= 2) {
   mta.text $1 $mta.nick($1,$2) has reached the warnings limit and will be kicked!
   mta.kick $1 $2
   !remini " $+ $scriptdir $+ warnings.ini" $3 $mta.nick($1,$2)
 }
 else mta.text $1 $mta.nick($1,$2) has got a warning for $iif($3 == afk,being away from keyboard,$iif($3 == camp,camping,bad language)) $+! $calc(2-$readini($scriptdir $+ warnings.ini,$3,$mta.nick($1,$2))) more warnings and he will be kicked.
}

You sir are and absolute genius :D

Thankyou again :D

EDIT:- just noticed that anyone can use this script lol.

Is there anyway of ensuring no one under level 5 can use it?

Cheers again.

Link to comment

Woops have to post it in this topic

  if ($findtok($3-,f*ck,32)) { 
   !writeini -n " $+ $scriptdir $+ warnings8.ini" WARNINGS $mta.nick($1,$2) $calc($gus.warnings8($1,$2)+1) 
   if ($gus.warnings8($1,$2) >= 3) { 
     mta.text $1 $mta.nick($1,$2) has reached the warnings limit and will be muted for 1 minute!  
     !.timer 1 3 mta.mute $1 $2 
     !writeini -n " $+ $scriptdir $+ warnings8.ini" WARNINGS $mta.nick($1,$2) 0 
     !.timer 1 63 mta.unmute $1 $2 
   } 
   else mta.text $1 $mta.nick($1,$2) don't use that kind of language! $calc(3-$gus.warnings8($1,$2)) more warnings and you will be muted for 1 minute. 
 } 

This is the script I am talkin about, but now I want to add more words without writing a second script. And will it be possible to let someone be muted too when hes saying :o (becuase the f*ck is in the word) But wont be kicked if hes saying Fighting ur cosins killer...? Someone?

Thanks!

Link to comment
  • Recently Browsing   0 members

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