how can i edit so the wins will work? because you only win if the last player goes in the water why is that ???
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
}