Jump to content

Storing nicks on map start..


MB|Lagzilla

Recommended Posts

think that will work not tested it lol just wrote it in here :P

  
on *:SIGNAL:mta.startrace: { 
  if ($mta.server($1).players > 0) slr.addplayers $1- 
} 
alias slr.addplayers { 
  var %a = 0 
  while (%a < $mta.server($1).cmax) { 
    if ($mta.nick($1,%a) > $null) { 
      !writeini -n slrplayers.ini players $mta.nick($1,%a) $mta.nick($1,%a) 
    } 
    !inc %a 
  } 
} 
  

Edited by Guest
Link to comment

can you say what you need it for ?

when you write a ini it stores the values like say todd=1

so to write that to ini you would do !writeini -n slrplayer.ini players todd 1

so i am writinig now with mine = but its storing all the players nicks on the start of a race, which i dont understand because it will get preaty full and you wont be able to store any more :P

by the way i fixed the other one lol wrote it like i write hash but half ini and half hash :lol:

Link to comment
  
on *:SIGNAL:mta.startrace: { 
  var %a = 0 
  !remove " $+ $scriptdir $+ players.ini" 
  while (%a <= $mta.server($1).cmax) { 
    if ($mta.nick($1,%a)) { 
      !writeini " $+ $scriptdir $+ players.ini" players %a $mta.nick($1,%a) 
    } 
    !inc %a 
  } 
} 
  

Edited by Guest
Link to comment

better speak to toady lol i no expert with gus :P

but i had a go at it lol so it might be wrong :(

on *:SIGNAL:mta.finish: {

if (4 > $mta.rank($1,$2)) {

mta.text $1 $mta.nick($1,$2) Position: $replace($mta.rank($1,$2),1,1st,2,2nd,3,3rd) - Time: $mta.time($1,$2).text

if ($mta.rank($1,$2) == 1) {

!writeini " $+ $scriptdir $+ playerswins.ini" players $mta.nick($1,$2) $+ 1 $calc($slr.pos($1,$2) + 1)

}

if ($mta.rank($1,$2) == 2) {

!writeini " $+ $scriptdir $+ playerswins.ini" players $mta.nick($1,$2) $+ 2 $calc($slr.pos($1,$2) + 1)

}

if ($mta.rank($1,$2) == 3) {

!writeini " $+ $scriptdir $+ playerswins.ini" players $mta.nick($1,$2) $+ 3 $calc($slr.pos($1,$2) + 1)

}

}

}

alias slr.pos !return $iif($readini($scriptdir $+ playerswins.ini,players,$mta.nick($1,$2) $+ $mta.rank($1,$2)) == $null,0,$v1)

that will write the players name + there rank then count there wins :P

like todd1=2

todd2=1

todd3=5

Link to comment

Yes and the last one alive will be nick = 1....

    var %a = 0,%b,%c,%d 
    while (%a <= $ini(gus.commands.ini,COMMANDS,0)) { 
      if ($gus.level($1,$2) >= $gus.cmdlevel($ini(gus.commands.ini,COMMANDS,%a))) { 
        if (!%b) %b = $ini(gus.commands.ini,COMMANDS,%a) 
        elseif ($len(%b) <= 200) %b = %b $+ , $ini(gus.commands.ini,COMMANDS,%a) 
        elseif (!%c) %c = $ini(gus.commands.ini,COMMANDS,%a) 
        elseif ($len(%c) <= 200) %c = %c $+ , $ini(gus.commands.ini,COMMANDS,%a) 
        elseif (!%d) %d = $ini(gus.commands.ini,COMMANDS,%a) 
        elseif ($len(%d) <= 200) %d = %d $+ , $ini(gus.commands.ini,COMMANDS,%a) 
      } 
      !inc %a 
    } 
    if (%b) { 
      gus.pm $1 $2 Current Level $gus.level($1,$2) Commands 
      gus.pm $1 $2 %b 
      if (%c) .timer 1 2 gus.pm $1 $2 %c 
      if (%d) .timer 1 4 gus.pm $1 $2 %d 
    } 

I think it would be possible to edit that to do the job?

Link to comment

give this a bash :P

on *:SIGNAL:mta.startrace: { 
  if ($mta.nick($1,$2) != $null) {  
    !writeini -n ad.ini tot total $mta.server($1).players 
    slr.starting $1- 
  } 
} 
on *:SIGNAL:mta.part: {  
  if ($readini(ad.ini,ad,$mta.nick($1,$2)) == Alive) { 
    !writeini -n ad.ini tot total $calc($slr.tot($1) - 1) 
    !writeini -n ad.ini ad $mta.nick($1,$2) DEAD 
    if ($slr.tot($1) == 1) mta.end $1- 
  }  
} 
on *:SIGNAL:mta.death: {  
  !writeini -n ad.ini tot total $calc($slr.tot($1) - 1) 
  !writeini -n ad.ini ad $mta.nick($1,$2) DEAD  
  if ($slr.tot($1) == 1) mta.end $1-  
}  
alias slr.tot !return $readini(ad.ini,tot,total) 
alias slr.starting { 
  var %a = 0 
  while (%a <= $mta.server($1).cmax) { 
    !writeini ad.ini ad $mta.nick($1,%a) Alive 
  } 
  !inc %a 
} 
alias mta.end {  
  var %a = 0 
  while (%a <= $mta.server($1).cmax) {  
    if ($readini(ad.ini,ad,$mta.nick($1,%a) == Alive)) { 
      if ($mta.nick($1,%a) != $null) {  
        mta.text $1 $mta.race($1) $+ : The Last Man Standing Is $mta.nick($1,%a) $+ ! 
        !remini ad.ini tot  
        !remini ad.ini ad 
        !writeini -n stats.ini WINS $mta.nick($1,%a) $calc($readini(stats.ini,WINS,$mta.nick($1,%a)) + 1) 
        !halt  
      } 
      !inc %a  
    }  
  }  
} 

Link to comment

on *:SIGNAL:mta.startrace: { 
  if ($mta.nick($1,$2) != $null) {  
    !writeini -n ad.ini tot total $mta.server($1).players 
    slr.starting $1- 
  } 
} 
on *:SIGNAL:mta.part: {  
  if ($readini(ad.ini,ad,$mta.nick($1,$2)) == Alive) { 
    !writeini -n ad.ini tot total $calc($slr.tot($1) - 1) 
    !writeini -n ad.ini ad $mta.nick($1,$2) DEAD 
    if ($slr.tot($1) == 1) mta.end $1- 
  }  
} 
on *:SIGNAL:mta.death: {  
  !writeini -n ad.ini tot total $calc($slr.tot($1) - 1) 
  !writeini -n ad.ini ad $mta.nick($1,$2) DEAD  
  if ($slr.tot($1) == 1) mta.end $1-  
}  
alias slr.tot !return $readini(ad.ini,tot,total) 
alias slr.starting { 
  var %a = 0 
  while (%a <= $mta.server($1).cmax) { 
    !writeini ad.ini ad $mta.nick($1,%a) Alive 
    !inc %a 
} 
} 
alias mta.end {  
  var %a = 0 
  while (%a <= $mta.server($1).cmax) {  
    if ($readini(ad.ini,ad,$mta.nick($1,%a) == Alive)) { 
      if ($mta.nick($1,%a) != $null) {  
        mta.text $1 $mta.race($1) $+ : The Last Man Standing Is $mta.nick($1,%a) $+ ! 
        !remini ad.ini tot  
        !remini ad.ini ad 
        !writeini -n stats.ini WINS $mta.nick($1,%a) $calc($readini(stats.ini,WINS,$mta.nick($1,%a)) + 1) 
        !halt  
      } 
     } 
      !inc %a  
      }  
} 

shouldnt crash it now

Link to comment
  • Recently Browsing   0 members

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