Jump to content

RS Detection Script!


HouseMD

Recommended Posts

U must have all the maps of the server you are scripting for it to work!

alias detect.rs {
unset %rs
var %a = 0,%place = 
while (%a <= $lines(%place $+ $mta.race($1) $+ .map)) {
if (none isin $read(%place $+ $mta.race($1) $+ .map, %a)) set %rs $calc(%rs + 1)
if (%a == 40) var %a = $lines(%place $+ $mta.race($1) $+ .map)
!inc %a
}
if (%rs == 1) !writeini -n rs.ini maps $replace($mta.race($1),$chr(32),-) Off
else !writeini -n rs.ini maps $replace($mta.race($1),$chr(32),-) On
}
on *:SIGNAL:mta.startrace: {
Detect.rs $1-
mta.text $1 Respawn: $readini(rs.ini,maps,$replace($mta.race($1),$chr(32),-))
}

Make sure u replace where it says %place on top, with the place u where u put ur maps (Eg %place = D:\Maps\) and u must have the "\" at the end, otherwise it won't work!

Link to comment
U must have all the maps of the server you are scripting for it to work!

alias detect.rs {
unset %rs
var %a = 0,%place = 
while (%a <= $lines(%place $+ $mta.race($1) $+ .map)) {
if (none isin $read(%place $+ $mta.race($1) $+ .map, %a)) set %rs $calc(%rs + 1)
if (%a == 40) var %a = $lines(%place $+ $mta.race($1) $+ .map)
!inc %a
}
if (%rs == 1) !writeini -n rs.ini maps $replace($mta.race($1),$chr(32),-) Off
else !writeini -n rs.ini maps $replace($mta.race($1),$chr(32),-) On
}
on *:SIGNAL:mta.startrace: {
Detect.rs $1-
mta.text $1 Respawn: $readini(rs.ini,maps,$replace($mta.race($1),$chr(32),-))
}

Make sure u replace where it says %place on top, with the place u where u put ur maps (Eg %place = D:\Maps\) and u must have the "\" at the end, otherwise it won't work!

+ !respawn command what shows is respawn on/off

alias detect.rs {
unset %rs
var %a = 0,%place = 
while (%a <= $lines(%place $+ $mta.race($1) $+ .map)) {
if (none isin $read(%place $+ $mta.race($1) $+ .map, %a)) set %rs $calc(%rs + 1)
if (%a == 40) var %a = $lines(%place $+ $mta.race($1) $+ .map)
!inc %a
}
if (%rs == 1) !writeini -n rs.ini maps $replace($mta.race($1),$chr(32),-) Off
else !writeini -n rs.ini maps $replace($mta.race($1),$chr(32),-) On
}
on *:SIGNAL:mta.startrace: {
Detect.rs $1-
mta.text $1 Respawn: $readini(rs.ini,maps,$replace($mta.race($1),$chr(32),-))
} 
on *:SIGNAL:mta.command: {
 if ($3 == !respawn) {
Detect.rs $1-
mta.text $1 $2 /me In $mta.race($1) Respawn is $readini(rs.ini,maps,$replace($mta.race($1),$chr(32),-)) $+ !
}

Link to comment
  • Recently Browsing   0 members

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