Keslertje2005 Posted March 17, 2007 Posted March 17, 2007 Hi guys, I would like to have the following script working: on *:SIGNAL:mta.command:{ ;Parameters: ;$1 = Server ;$2 = Race ID ;$3 = 0/1/2 (success,failed,no players) 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) if ($3 == !mod) { if ($mta.race($1) == Unknown) mta.pm $1 $2 Error - Unknown Race else { mta.text $1 Current Map: $mta.race($1) mta.text $1 /me Moderated by: $readini($scriptdir $+ instructions.ini,MOD,$replace($mta.races($1,$2),$chr(32),)) } } } It has to read something in instructions.ini under [MOD] the names are stored in the right way but I can't get them in mta.text... Can someone help me? Tryed everything Thnx
Keslertje2005 Posted March 17, 2007 Author Posted March 17, 2007 And if there is no name found it has to say: N/A
DiZuM Posted March 18, 2007 Posted March 18, 2007 Hi guys, I would like to have the following script working: on *:SIGNAL:mta.command:{ ;Parameters: ;$1 = Server ;$2 = Race ID ;$3 = 0/1/2 (success,failed,no players) 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) if ($3 == !mod) { if ($mta.race($1) == Unknown) mta.pm $1 $2 Error - Unknown Race else { mta.text $1 Current Map: $mta.race($1) mta.text $1 /me Moderated by: $readini($scriptdir $+ instructions.ini,MOD,$replace($mta.races($1,$2),$chr(32),)) } } } It has to read something in instructions.ini under [MOD] the names are stored in the right way but I can't get them in mta.text... Can someone help me? Tryed everything Thnx on *:SIGNAL:mta.startrace:{ ;Parameters: ;$1 = Server ;$2 = Race ID ;$3 = 0/1/2 (success,failed,no players) var %a = !writeini -n " $+ $scriptdir $+ mta.stats.ini" times $calc(times+1),%b = $readini($scriptdir $+ mta.stats.ini,ALL,$ini($scriptdir $+ mta.stats.ini,ALL,%b))) if ($mta.race($1) == Unknown) mta.pm $1 $2 Error - Unknown Race else { mta.text $1 Current Map: $mta.race($1) mta.text $1 /me Moderated by: $readini($scriptdir $+ instructions.ini,MOD,$replace($mta.races($1,$2),$chr(32),)) } Not tested, but should works fine.
Scooby Posted March 18, 2007 Posted March 18, 2007 u say the instructions are already in the file? and ur sure this is the right location? $readini($scriptdir $+ instructions.ini,MOD,$replace($mta.races($1,$2),$chr(32),)) (looks wrong to me but im just guessing) if so, use this: on *:SIGNAL:mta.startrace:{ mta.text $1 $iif($readini($scriptdir $+ instructions.ini,MOD,$replace($mta.races($1,$2),$chr(32),)) == $null,No Details Stored,Current Map: $mta.race($1) - Moderated by: $v1) }
Keslertje2005 Posted March 23, 2007 Author Posted March 23, 2007 woops yeh, maybe it is wrong... Ive got instructions.ini, in the map is the mapname stored like: High into the sky=Test When they do ! they have to see the text behind the map, how do i do that?
Scooby Posted March 23, 2007 Posted March 23, 2007 woops yeh, maybe it is wrong... Ive got instructions.ini, in the map is the mapname stored like: High into the sky=TestWhen they do ! they have to see the text behind the map, how do i do that? if ($3 == !instructions) mta.text $1 $iif($readini($scriptdirinstructions.ini,mod,$replace($mta.race($1),$chr(32),)) == $null,No Details Stored,Current Map: $mta.race($1) - Details: $v1)
Recommended Posts