Jump to content

Points Script


The_Stig

Recommended Posts

ok i found this script earlier doing a search:-

on *:SIGNAL:mta.finish: {
 if (($mta.rank($1,$2) <= 5) && ($mta.server($1).players >= 2)) {
   var %score = $replacex($mta.rank($1,$2),1,5,2,4,3,3,4,2,5,1)
   var %position = $replace($mta.rank($1,$2),1,first,2,second,3,third,4,fourth,5,fifth)
   mta.text $1 $mta.nick($1,$2) came %position $+ and earned %score points!
   !writeini " $+ $scriptdir $+ points.ini" POINTS $mta.ip($1,$2) $iif($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),$calc($v1 + %score),%score)
 }
 elseif ($mta.server($1).players == 1) {
   mta.text $1 Playing alone earned you 2 points!
   !writeini " $+ $scriptdir $+ points.ini" POINTS $mta.ip($1,$2) $iif($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),$calc($v1 + 2),2)
 }
}

But everytime someone places i get this:-

[01:15] 

notice the missing space inbetween 'firstand'.

i have tried manually adding in a space but it doesnt seem to take it.

Any ideas folks??

Regards,

John.

Link to comment

on *:SIGNAL:mta.finish: {
 if (($mta.rank($1,$2) <= 5) && ($mta.server($1).players >= 2)) {
   var %score = $replacex($mta.rank($1,$2),1,5,2,4,3,3,4,2,5,1)
   var %position = $replace($mta.rank($1,$2),1,first,2,second,3,third,4,fourth,5,fifth)
   mta.text $1 $mta.nick($1,$2) came %position and earned %score points!
   !writeini " $+ $scriptdir $+ points.ini" POINTS $mta.ip($1,$2) $iif($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),$calc($v1 + %score),%score)
 }
 elseif ($mta.server($1).players == 1) {
   mta.text $1 Playing alone earned you 2 points!
   !writeini " $+ $scriptdir $+ points.ini" POINTS $mta.ip($1,$2) $iif($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),$calc($v1 + 2),2)
 }
}

that one is with space there :)

Link to comment
  • 1 month later...
on *:SIGNAL:mta.finish: {
 if (($mta.rank($1,$2) <5>= 2)) {
   var %score = $replacex($mta.rank($1,$2),1,5,2,4,3,3,4,2,5,1)
   var %position = $replace($mta.rank($1,$2),1,first,2,second,3,third,4,fourth,5,fifth)
   mta.text $1 $mta.nick($1,$2) came %position and earned %score points!
   !writeini " $+ $scriptdir $+ points.ini" POINTS $mta.ip($1,$2) $iif($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),$calc($v1 + %score),%score)
 }
 elseif ($mta.server($1).players == 1) {
   mta.text $1 Playing alone earned you 2 points!
   !writeini " $+ $scriptdir $+ points.ini" POINTS $mta.ip($1,$2) $iif($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),$calc($v1 + 2),2)
 }
}

that one is with space there :)

is the a command for checking said players score?

and/or is there a way to incorperate the score into !stats along side wind/deaths/spawns and so on?

:::EDIT:::

Auctually, i have just found this script to be useless with a dynamic IP.

Link to comment
  • 4 years later...
  • Recently Browsing   0 members

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