Jump to content

Small script help


HouseMD

Recommended Posts

Posted

I couldn't figure out how to get this to work:

if ($3 == !restartmap) mta.startrace $mta.race($1) $+

It starts some other map...instead of the map you are playing...

Always Remember, Everyone Lies and Trust No-one

House.png

Posted

It will not work because i already tried it, it should work like the map command.

if ($3 == !map) Mta.text $1 Map Name : mta.race($1) $+

Thats how the changemap should work, or maybe if I change it to work on ID...

Always Remember, Everyone Lies and Trust No-one

House.png

Posted

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

Always Remember, Everyone Lies and Trust No-one

House.png

Posted
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))

ScoobySig.gif

[UVA]Scooby

Founder Of UVA - Ultimate Vice Assassins

http://www.uvaclan.com/

Posted

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.

Always Remember, Everyone Lies and Trust No-one

House.png

Posted
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.

ScoobySig.gif

[UVA]Scooby

Founder Of UVA - Ultimate Vice Assassins

http://www.uvaclan.com/

  • 3 weeks later...
Posted
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),))
 }
}

  • Recently Browsing   0 members

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