Jump to content

[TAC]Kinq

Members
  • Posts

    16
  • Joined

  • Last visited

Posts posted by [TAC]Kinq

  1. i am not sure but i think, this works...

    on *:SIGNAL:prs.endrace: {

    pgs.checkwins $1-

    if ($prs.mode($1) != Race) && (%pgs == on) {

    var %a = $calc($prs.players($1) * 50)

    pgs.add $mta.nick($1,$2) %a

    pgs.pm $1 $2 Cash Earned: $ $+ %a - Total Cash: $ $+ $pgs.cash($1,$2)

    }

    }

    @ Scripters:

    when i have a mistake please correct it

  2. alias mta.getid {
     var %a = 0
     while (%a <= $mta.server($1).cmax)  {
       if ($+(*,$2,*) iswm $mta.nick($1,%a)) !return %a
       !inc %a
     }
     !return -1
    }
    on *:SIGNAL:mta.command: {
     Commands.checks $1-
     if ($3 == !info) mta.text $1 Add-Commands-Command 1.0 by House MD.
     elseif (($3 == !AddCom) || ($3 == !RemCom)) {
       Addand.Ban $1-
     }
     elseif ($3 == !CreatedCom) mta.text $1 There are currently $lines(Commands.txt) created commands
    }
    alias Addand.Ban {
     if ($mta.level($1,$2) < 5) mta.pm $1 $2 Error: Level 5 Admins Only!
     elseif ($3 == !AddCom) {
       if (!$4) mta.pm $1 $2 Error: !AddCom 
       if (!$5) mta.pm $1 $2 Error: !AddCom 
       else {
         var %a = 1,%b = $lines(commands.txt)
         while (%a <= %b) {
           if ($4 iswm $read(commands.txt,%a)) {
             mta.pm $1 $2 Error: Command Already Created
             !halt
           }
           !inc %a
         }
         !write commands.txt $4
         !writeini -n coms.ini command $4 $5-
         mta.text $1 Command $4 created
       }
     }
     elseif ($3 == !RemCom) {
       if (!$4) mta.pm $1 $2 Error: !RemCom 
       else {
         var %a = 1,%b = $lines(commands.txt)
         while (%a <= %b) {
           if ($4 iswm $read(commands.txt,%a)) {
             !write -ds $+ $4 commands.txt
             !remini -n coms.ini command $4
             mta.text $1 command $4 removed
             %a = $calc(%b + 2)
           }
           !inc %a
         }
         if (%a == $calc(%b + 1)) mta.pm $1 $2 Error: Command $4 has not been created.
       }
     }
    }
    alias Commands.checks {
     var %a = $iif($4,$iif($mta.nick($1,$4) != $null,$4,$gus.getid($1,$4)),$2),%b = $3,%c = $lines(commands.txt),%d = 1
     while (%d <= %c) {
       if ($read(commands.txt,%d) iswm %b) {
         mta.text $1 $readini(coms.ini,command,$read(commands.txt,%d))
         %d = %c
       }
       !inc %d
     }
    }
    

    You have to type !addcom and !remcom[/code]

×
×
  • Create New...