Hedning Posted August 4, 2006 Posted August 4, 2006 I want a script that make so you can only play a map 5 times, after 5 times you must play a new map.
lil Toady Posted August 4, 2006 Posted August 4, 2006 on *:SIGNAL:mta.startrace: { var %a = $readini($scriptdir $+ maplimit.ini,LIMIT,$replace($mta.race($1),$chr(32),$chr(45))) if (%a >= 5) { mta.text $1 This map has reached its play limit, picking new map.. mta.startrace $1 $rand(0,$mta.races($1)) } else !writeini " $+ $scriptdir $+ maplimit.ini" LIMIT $replace($mta.race($1),$chr(32),$chr(45)) $calc(%a + 1) } Do not PM me, im not going to read it anyway.
CoZ Posted August 4, 2006 Posted August 4, 2006 on *:SIGNAL:mta.startrace: { var %a = $readini($scriptdir $+ maplimit.ini,LIMIT,$replace($mta.race($1),$chr(32),$chr(45))) if (%a >= 5) { mta.text $1 This map has reached its play limit, picking new map.. mta.startrace $1 $rand(0,$mta.races($1)) } else !writeini " $+ $scriptdir $+ maplimit.ini" LIMIT $replace($mta.race($1),$chr(32),$chr(45)) $calc(%a + 1) } maybe this is better it changes after 5 , but makes it possible to play it again later on *:SIGNAL:mta.startrace: { var %a = $readini($scriptdir $+ maplimit.ini,LIMIT,$replace($mta.race($1),$chr(32),$chr(45))) if (%a >= 5) { mta.text $1 This map has reached its play limit, picking new map.. !writeini -n " $+ $scriptdir $+ maplimit.ini" LIMIT $replace($mta.race($1),$chr(32),$chr(45))) 0 mta.startrace $1 $rand(0,$mta.races($1)) } else !writeini " $+ $scriptdir $+ maplimit.ini" LIMIT $replace($mta.race($1),$chr(32),$chr(45)) $calc(%a + 1) } Server Blog | Server quickinfo STFU and dont bug the mta team with ''when is DM comming'' or risk theyre spending more time explaining they're still working on DM than actually getting work done
lil Toady Posted August 4, 2006 Posted August 4, 2006 use !remini then, no need to write 0 or i could change your example coz to this has 1 line less on *:SIGNAL:mta.startrace: { var %a = $readini($scriptdir $+ maplimit.ini,LIMIT,$replace($mta.race($1),$chr(32),$chr(45))) if (%a >= 5) { mta.text $1 This map has reached its play limit, picking new map.. mta.startrace $1 $rand(0,$mta.races($1)) } !writeini " $+ $scriptdir $+ maplimit.ini" LIMIT $replace($mta.race($1),$chr(32),$chr(45)) $iif(%a = 5,0,$calc(%a + 1)) } Do not PM me, im not going to read it anyway.
Hedning Posted August 4, 2006 Author Posted August 4, 2006 on *:SIGNAL:mta.startrace: { var %a = $readini($scriptdir $+ maplimit.ini,LIMIT,$replace($mta.race($1),$chr(32),$chr(45))) if (%a >= 5) { mta.text $1 This map has reached its play limit, picking new map.. !writeini -n " $+ $scriptdir $+ maplimit.ini" LIMIT $replace($mta.race($1),$chr(32),$chr(45))) 0 mta.startrace $1 $rand(0,$mta.races($1)) } else !writeini " $+ $scriptdir $+ maplimit.ini" LIMIT $replace($mta.race($1),$chr(32),$chr(45)) $calc(%a + 1) } So if i play a map 5 times and then change to another map and play like 1 time then i want to change to that map again, it will work again? Hope you understadn
CoZ Posted August 4, 2006 Posted August 4, 2006 yes Server Blog | Server quickinfo STFU and dont bug the mta team with ''when is DM comming'' or risk theyre spending more time explaining they're still working on DM than actually getting work done
Recommended Posts