Jump to content

can u help me wiv this plz mta0.5 !warn !warned !unwarn


BooM

Recommended Posts

on *:SIGNAL:mta.command: {

if ($3 == !warn) {

if (%a == -1) mta.msg $1 $2 Error - Absent ID.

elseif (%a == $2) mta.msg $1 $2 Error - Can't warn yourself.

else {

!writeini " $+ $scriptdir $+ mta.warns.ini" WARNINGS $mta.name($1,%a) $calc($mta.warns($1,%a) + 1)

if ($mta.warns($1,%a) >= 0) {

mta.say $1 Kicking $mta.name($1,%a) for reaching the warnings limit. $iif($5,Reason: $5-)

mta.kick $1 %a

}

else mta.say $1 $mta.name($1,%a) $+ , $replace($mta.warns($1,%a),1,first,2,second,3,third) warning. $calc(3 - $mta.warns($1,%a)) more warnings and you will be kicked.

}

}

elseif ($3 == !unwarn) {

if (%a == -1) mta.msg $1 $2 Error - Absent ID.

elseif (%a == $2) mta.msg $1 $2 Error - Can't unwarn yourself.

else {

!writeini " $+ $scriptdir $+ mta.warns.ini" WARNINGS $mta.name($1,%a)

if ($mta.warns($1,%a) >=3) {

mta.say $1 unwarned $mta.name($1,%a)

}

}

}

elseif ($3 == !warned) {

var %a = 0,%b = $null

while (%a < 32) {

if ($readini(%dir " $+ $scriptdir $+ mta.warns.ini" WARNINGS $mta.name($1,%a)

!inc %a

}

if (%b == $null) mta.say $1 No players currently warned.

else mta.say $1 Current warned players: %b

}

__________________________________________________________________________________________________________

hey can u help me out with the warn script plz eney 1 :roll: /me crys help!!

Link to comment

try this

alias mta.warn {  
  var %b = $iif($4 == $null,$2,$mta.findid($1,$4))) 
  if (%b == -1) mta.say $1 Error - Absent ID 
  elseif ($4 == $null) mta.say $1 $mta.name($1,$2) $+ : Syntax - !warn <id/name>  
  elseif ($readini(MTAScript.ini,main,$mta.name($1,%b)) == 1) {  
    if ($5 != $null) {  
      mta.say $1 Warning: ' $+ $mta.name($1,%b) $+ ' One more warning and you will be temporarily banned. Reason: $5- $+ . 
      writeini -n "MTAScript.ini" main $mta.name($1,%b) 2 
      writeini -n "MTAScript.ini" reasons $mta.name($1,%b) $5-  
    }  
    else {  
      mta.say $1 Warning: ' $+ $mta.name($1,%b) $+ ' one more warning and you will be temporarily banned. 
      writeini -n "MTAScript.ini" main $mta.name($1,%b) 2 
    }  
  }  
  alias mta.unwarn {   
    if (%b == -1) mta.say $1 Error - Absent ID 
    elseif ($4 != $null) {  
      mta.say $1 $mta.name($1,$2) $+ : Removed warnings on ' $+ $mta.name($1,%b) $+ '   
      remini "MTAScript.ini" main $mta.name($1,%b) 
      remini "MTAScript.ini" joinkick $mta.name($1,%b) 
      remini "MTAScript.ini" reasons $mta.name($1,%b) 
    }  
    else {  
      mta.say $1 Syntax: !erasewarn <name>  
    }  
  }  
  alias mta.warnings {  
    if ( $readini( "MTAScript.ini", main, $mta.name($1,%b) ) == 1 ) {  
      mta.say $1 $mta.name($1,%b) has been warned 1 time.  
    }  
    elseif ( $readini( "MTAScript.ini", main, $mta.name($1,%b) ) == 2 ) {  
      mta.say $1 $mta.name($1,%b) has been warned 2 times.  
    }  
    else {  
      mta.say $1 $mta.name($1,%b) has been warned 0 times.  
    }  
  }  
  on *:SIGNAL:mta.command: { 
    if $3 == !warn mta.warn $1- 
    elseif $3 == !unwarn mta.unwarn $1- 
    elseif $3 == !warnings mta.warnings $1- 
  }  
}  
  

Link to comment
  • 1 month later...

hello, help on this plz, :shock: alias ini :evil:

on *:SIGNAL:mta.command:{

if ($3 == !warned) {

var %a = 0,%b = $null

while (%a < 32) {

if ($readini(%dir $+ $1.ini,ID $+ %a,warns) >= 1) %b = %b $mta.name($1,%a)

!inc %a

}

if (%b == $null) mta.say $1 No players currently warned.

else mta.say $1 Current warned players: %b

}

elseif ($3 == !unwarn) {

if %b == -1 mta.say $1 Error - Absent ID

else {

if $readini($mta.dir $+ $1.ini,ID $+ %b,warns) >= 1 {

var %c = $calc($readini($mta.dir $+ $1.ini,ID $+ %b,warns) -1)

!writeini -n $+(",$mta.dir,$1.ini") ID $+ %b warns %c

mta.say $1 $mta.name($1,$2) unwarned $mta.name($1,%b) $+ . %c warnings remaining.

else mta.msg $1 $2 $mta.name($1,%b) unwarned. %c warnings remaining.

}

else mta.msg $1 $2 $mta.name($1,%b) is not warned.

}

}

elseif $3 == !warn {

if %b == -1 mta.msg $1 $2 Error - Absent ID

else mta.warn $1 $2 %b $5-

}

}

}

alias mta.warn {

var %a = $readini($mta.dir $+ $1.ini,ID $+ $3,warns)

if $calc(%a + 1) == $readini($mta.dir $+ options.ini,main,warns) {

if ($4 != $null) {

mta.say $1 $mta.name($1,$3) $+ : Final warning. Reason: $4- $+ . Goodbye.

mta.kick $1 $3

}

else {

mta.say $1 $mta.name($1,$3) $+ : Final warning. Goodbye.

mta.kick $1 $3

}

}

else {

if ($4 != $null) {

mta.say $1 $mta.name($1,$3) warned $+ by $mta.name($1,$2)) $+ . $calc($readini($mta.dir $+ options.ini,main,warns) - $calc( %a + 1 )) more warnings and you will be kicked. Reason: $4-

!writeini " $+ $mta.dir $+ $1 $+ .ini" ID $+ $3 warns $calc(%a + 1)

}

else {

mta.say $1 $mta.name($1,$3) warned by $mta.name($1,$2)) $+ . $calc($readini($mta.dir $+ options.ini,main,warns) - $calc( %a + 1 )) more warnings and you will be kicked.

!writeini " $+ $mta.dir $+ $1 $+ .ini" ID $+ $3 warns $calc(%a + 1)

}

}

}

its sorta works

BooM: !warn BooM

Unknown warned by BooM. -1 more warnings and you will be kicked.

BooM: !warned

No players currently warned.

BooM: !warn BooM

Unknown warned by BooM. -2 more warnings and you will be kicked.

BooM: !warn BOO

Unknown warned by BooM. -3 more warnings and you will be kicked.

BooM: !UNWARN BO

BooM unwarned Unknown. 2 warnings remaining.

lol

thx :(

Link to comment
  • Recently Browsing   0 members

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