Jump to content

DD / DM script > If you win DD map, you get one more wins.


SanZoR.Sr

Recommended Posts

I have posted this same script many topics, so i am tired of that, so there ppl can look it right now. There it goes:

alias mta.end {
 if (%cplayers == 1) {
   var %a = 0
   while (%a < $mta.server($1).cmax) {
     if (!$mta.dead($1,%a)) {
       mta.text $1 $mta.nick($1,%a) is winner!
       mta.freeze $1 %a
!writeini -n " $+ $scriptdir $+ stats.ini" WINS $mta.nick($1,%a) $gus.add($gus.wins($1,%a),1)
       !halt
     }
     !inc %a
   }
 }
}
on *:SIGNAL:mta.startrace: {
 set %cplayers $mta.server($1).players
}
on *:SIGNAL:mta.part: {
 if (!$mta.dead($1,$2) set %cplayers $calc(%cplayers - 1)
 mta.end $1 $2
}
on *:SIGNAL:mta.death: {
 set %cplayers $calc(%cplayers - 1)
 mta.end $1 $2
}
on *:SIGNAL:mta.connect: {
 set %cplayers 0
}

This script works perfectly if there are no one players whit % and $ letters in name. Some other special letters are buggy too, but exacly those. So... have fun =D

Link to comment

Easy way to add this script in GUS is:

1. Create a new text file into GUS folder.

2. Copy this code into that text file:

alias mta.end {
 if (%cplayers == 1) {
   var %a = 0
   while (%a < $mta.server($1).cmax) {
     if (!$mta.dead($1,%a)) {
       mta.text $1 $mta.nick($1,%a) is winner!
       mta.freeze $1 %a
!writeini -n " $+ $scriptdir $+ stats.ini" WINS $mta.nick($1,%a) $gus.add($gus.wins($1,%a),1)
       !halt
     }
     !inc %a
   }
 }
}
on *:SIGNAL:mta.startrace: {
 set %cplayers $mta.server($1).players
}
on *:SIGNAL:mta.part: {
 if (!$mta.dead($1,$2) set %cplayers $calc(%cplayers - 1)
 mta.end $1 $2
}
on *:SIGNAL:mta.death: {
 set %cplayers $calc(%cplayers - 1)
 mta.end $1 $2
}
on *:SIGNAL:mta.connect: {
 set %cplayers 0
}

3. open MTA mIRC and add that text file into mIRC. Then it should works. And if you dont have GUS in dont know how get this script working, cause it uses GUS's WINS as you can clearly see. i hope this helps you to gettinng started, if not, sry my bad english. Thats why i cant explain maybe enought good how put this script into your server.

Link to comment

This one doesnt freezes:

alias mta.end {
 if (%cplayers == 1) {
   var %a = 0
   while (%a < $mta.server($1).cmax) {
     if (!$mta.dead($1,%a)) {
       mta.text $1 $mta.nick($1,%a) is winner!
!writeini -n " $+ $scriptdir $+ stats.ini" WINS $mta.nick($1,%a) $gus.add($gus.wins($1,%a),1)
       !halt
     }
     !inc %a
   }
 }
}
on *:SIGNAL:mta.startrace: {
 set %cplayers $mta.server($1).players
}
on *:SIGNAL:mta.part: {
 if (!$mta.dead($1,$2) set %cplayers $calc(%cplayers - 1)
 mta.end $1 $2
}
on *:SIGNAL:mta.death: {
 set %cplayers $calc(%cplayers - 1)
 mta.end $1 $2
}
on *:SIGNAL:mta.connect: {
 set %cplayers 0
}

Btw, it seems you are not good scripter? ;P That is really easy to edit stuff;

Normal DD script:

alias mta.end {
 if (%cplayers == 1) {
   var %a = 0
   while (%a < $mta.server($1).cmax) {
     if (!$mta.dead($1,%a)) {
       mta.text $1 $mta.nick($1,%a) is winner!
       mta.freeze $1 %a
!writeini -n " $+ $scriptdir $+ stats.ini" WINS $mta.nick($1,%a) $gus.add($gus.wins($1,%a),1)
       !halt
     }
     !inc %a
   }
 }
}
on *:SIGNAL:mta.startrace: {
 set %cplayers $mta.server($1).players
}
on *:SIGNAL:mta.part: {
 if (!$mta.dead($1,$2) set %cplayers $calc(%cplayers - 1)
 mta.end $1 $2
}
on *:SIGNAL:mta.death: {
 set %cplayers $calc(%cplayers - 1)
 mta.end $1 $2
}
on *:SIGNAL:mta.connect: {
 set %cplayers 0
}

Remove this text:

mta.freeze $1 %a

Okay, first doesnt freezes.[/url]

Link to comment

Im sorry, but i cant just now =S Im not at home, and there were i am, doesnt have MTA...

Note: If you have in your server DD & Race maps, this script will be really buggy. It freezes in Racing map random player, so you need unfreeze him. This is recommended for ONLY DD servers. Thats good thing you askef me to remove that freezing part. That will be really laggy in race maps. But still if you have racing maps this script will give ppl reasonless wins.

Link to comment
  • Recently Browsing   0 members

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