Jump to content

Small script help


HouseMD

Recommended Posts

I told you i tried everything, and this was one of them, I have 32 maps now, and it changed to the last map! which was Carbon DD, and keeps changing there! There must be another way

if ($3 == !redo) mta.startrace $1 $mta.races($1,$mta.race($1))

Link to comment
thx Scoob, it works perfect now ^^

btw, Does anyone know how to fix the end count bug eg. When a race has ended and I say !redo, it restarts the map but it keeps counting and initiates the vote :( Does anyone know how to fix that, 'cause i don't have a clue.

no, u cant stop it once its started. Just try to remember not to start a new map untill its completely finished counting.

Link to comment
  • 3 weeks later...
on *:SIGNAL:mta.startrace: {
 ;Parameters:
 ;$1 = Server
 ;$2 = Race ID
 ;$3 = 0/1/2 (success,failed,no players)
 %remmap = $readini($scriptdir $+ remmap.ini,REMMAPS,$replace($mta.race($1),$chr(32),-))
 if (%constant = on && %constantmap != $mta.race($1) && %remmap != 1) mta.startrace $1 %constantmapid
 unset %constant
 unset %constantmap
 unset %constantmapid
 if (%remmap == 1 && %constant != on) {
   mta.text $1 Map " $+ $mta.race($1) $+ " has been removed, changing to a random map..
   !.timer 1 1 mta.startrace $1 $rand(0,$mta.races($1))
 }
 if ($3 == 0 && %remmap != 1) {
   set %race $2
   set %deaths 0
   set %topt 0
   set %currentdeaths 0
   var %a = $calc($readini($scriptdir $+ mta.stats.ini,n,$mta.races($1,$2),times) + 1),%b = $calc($readini($scriptdir $+ mta.stats.ini,n,ALL,times) + 1)
   !writeini -n $+(",$scriptdir,mta.stats.ini,") ALL times %b
   !writeini -n $+(",$scriptdir,mta.stats.ini,") $+(",$mta.races($1,$2),") times %a
   if ($mta.races($1,$2) != $null) mta.text $1 $mta.races($1,$2) - Top Time: $gus.toptime($1) - By: $gus.topname($1) - Deathlimit: $gus.deathlimit($1,$2) - Played: $+(%a,/,%b) times ( $+ $round($calc(100 / %b * %a),2) $+ % $+ )
   set %topt $gus.toptime($1)
 }
 if ($readini($scriptdir $+ instructions.ini,INSTRUCTIONS,$replace($mta.races($1,$2),$chr(32),)) != $null && $readini($scriptdir $+ instructions.ini,INSTRUCTIONS,$replace($mta.races($1,$2),$chr(32),)) != default && %remmap != 1) {
   mta.text $1 $mta.races($1,$2) - Instructions: $readini($scriptdir $+ instructions.ini,INSTRUCTIONS,$replace($mta.races($1,$2),$chr(32),))
 }
}

Link to comment
  • Recently Browsing   0 members

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