Jump to content

i tried but failed


Squall

Recommended Posts

help

on *:SIGNAL:mta.command:{
 if($3 == brb) mta.say $1 $mta.name($1,%a) is going away $+ . $iif($5,Reason: $5-)
(timer.on ) .timer 0 86400
 !writeini " $+ $scriptdir $+ why.ini" away $mta.name($1,$2) 
 elseif ($3 == !away) mta.msg $1 $2   %a = $readini($scriptdir $+ why.ini,away,$mta.name($1,$2))  
 {
elseif ($3 == back) mta.say $1 $mta.name ($1,%a) for $mta.time

Link to comment
help

on *:SIGNAL:mta.command:{
 if($3 == brb) mta.say $1 $mta.name($1,%a) is going away $+ . $iif($5,Reason: $5-)
(timer.on ) .timer 0 86400
 !writeini " $+ $scriptdir $+ why.ini" away $mta.name($1,$2) 
 elseif ($3 == !away) mta.msg $1 $2   %a = $readini($scriptdir $+ why.ini,away,$mta.name($1,$2))  
 {
elseif ($3 == back) mta.say $1 $mta.name ($1,%a) for $mta.time

take a know that:

change: on *:SIGNAL:mta.command:{ to: on *:SIGNAL:mta.text:{

well repaired script is here:

on *:SIGNAL:mta.text:{
 if($3 == brb) mta.say $1 $mta.name($1,%a) is going away $+ . $iif($5,Reason: $5-)
(timer.on ) .timer 0 86400
 !writeini " $+ $scriptdir $+ why.ini" away $mta.name($1,$2) 
 elseif ($3 == !away) mta.msg $1 $2   %a = $readini($scriptdir $+ why.ini,away,$mta.name($1,$2))  
 {
elseif ($3 == back) mta.say $1 $mta.name ($1,$2) is now back

I removed: $mta.name ($1,%a) for $mta.time ' goz i just wanna know, wtf is that :D

Cya, I hope that works^^

Link to comment

code]

on *:SIGNAL:mta.text:{

if($3 == brb) mta.say $1 $mta.name($1,%a) is going away $+ . $iif($5,Reason: $5-)

(timer.on ) .timer 0 86400

!writeini " $+ $scriptdir $+ why.ini" away $mta.name($1,$2)

elseif ($3 == !away) mta.msg $1 $2 %a = $readini($scriptdir $+ why.ini,away,$mta.name($1,$2))

{

elseif ($3 == back) mta.say $1 $mta.name ($1,$2) is now back

[/code]

you forgot (like i always do) the close braket

on *:SIGNAL:mta.text:{
 if($3 == brb) mta.say $1 $mta.name($1,%a) is going away $+ . $iif($5,Reason: $5-)
(timer.on ) .timer 0 86400
 !writeini " $+ $scriptdir $+ why.ini" away $mta.name($1,$2) 
 elseif ($3 == !away) mta.msg $1 $2   %a = $readini($scriptdir $+ why.ini,away,$mta.name($1,$2))  
 {
elseif ($3 == back) mta.say $1 $mta.name ($1,$2) is now back
{

well i think u did

Link to comment
on *:SIGNAL:mta.text:{
 if ($3 == brb) {
   if ($4 == $null) {
     mta.say $1 $mta.name($1,$2) Will be right back!
     !writeini $+(",$mta.dir,$1.ini") ID $+ $2 away 1
   }
   else {
     mta.say $1 $mta.name($1,$2) Will be right back! Reason: $4-
     !writeini $+(",$mta.dir,$1.ini") ID $+ $2 reason $4-
   }
 }
 if ($3 == back) {
   !remini $+(",$mta.dir,$1.ini") ID $+ $2 reason
   !writeini -n $+(",$mta.dir,$1.ini") ID $+ $2 away 0
 }
}
on *:SIGNAL:mta.command: {
  if ($3 == !away) {
   var %aa = 0,%bb
   while %aa <= $mta.maxplayers($1) {
     if $readini($mta.dir $+ $1.ini,ID $+ %aa,away) == 1 {
       if %bb == $null { %bb = $mta.name($1,%aa) $+ $iif($readini($mta.dir $+ $1.ini,ID $+ %aa,reason),( $+ $readini($mta.dir $+ $1.ini,ID $+ %aa,reason) $+ )) }
       else { %bb = %bb $+ , $mta.name($1,%aa) $+ $iif($readini($mta.dir $+ $1.ini,ID $+ %aa,reason),( $+ $readini($mta.dir $+ $1.ini,ID $+ %aa,reason) $+ )) }
     }
     !inc %aa
   }
   mta.say $1 $iif(%bb == $null,Noone has been Away,Away players: %bb)
 }
}

Link to comment
on *:SIGNAL:mta.text:{
 if ($readini($mta.dir $+ $1.ini,ID $+ $2,away)) {
   mta.say $1 $mta.name($1,$2) is back! (Away time: $duration($calc($ctime - $readini($mta.dir $+ $1.ini,ID $+ $2,away))) $+ )
   !remini " $+ $mta.dir $+ $1.ini" ID $+ $2 away
 }
 elseif ($3 == brb) {
   mta.say $1 $mta.name($1,$2) will be right back! $iif($4,Reason: $4-)
   !writeini " $+ $mta.dir $+ $1.ini" ID $+ $2 away $ctime
 }
}
on *:SIGNAL:mta.command:{
 if ($3 == !away) {
   var %a = 0
   while (%a <= $mta.maxplayers($1)) {
     if ($readini($mta.dir $+ $1.ini,ID $+ %a,away) {
       mta.say $1 $mta.name($1,%a) is away for $duration($calc($ctime - $readini($mta.dir $+ $1.ini,ID $+ %a,away)))
     }
     !inc %a
   }
 }
}

Link to comment

yeh, i forgot a bracket there

on *:SIGNAL:mta.text:{
 if ($readini($mta.dir $+ $1.ini,ID $+ $2,away)) {
   mta.say $1 $mta.name($1,$2) is back! (Away time: $duration($calc($ctime - $readini($mta.dir $+ $1.ini,ID $+ $2,away))) $+ )
   !remini " $+ $mta.dir $+ $1.ini" ID $+ $2 away
 }
 elseif ($3 == brb) {
   mta.say $1 $mta.name($1,$2) will be right back! $iif($4,Reason: $4-)
   !writeini " $+ $mta.dir $+ $1.ini" ID $+ $2 away $ctime
 }
}
on *:SIGNAL:mta.command:{
 if ($3 == !away) {
   var %a = 0
   while (%a <= $mta.maxplayers($1)) {
     if ($readini($mta.dir $+ $1.ini,ID $+ %a,away)) {
       mta.say $1 $mta.name($1,%a) is away for $duration($calc($ctime - $readini($mta.dir $+ $1.ini,ID $+ %a,away)))
     }
     !inc %a
   }
 }
}

this code works perfect for me, if it's not working for you, thats your prob and i cant help

Link to comment
  • Recently Browsing   0 members

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