Deathmatch script, thx for ur help Oli
Notes:
elseif $findtok(xcr talidan,$mta.name($1,$2),1,32) {
If u want to add more admins, seperate them with a space, as shown above.
*/
Deathmatch Script by XcR, idea by Talidan.
Please do not extract code without asking the author.
This script is free to use and distribute.
Special thanks: Talidan for the idea, [uVA]_ZzZ, [FMJ]Oli and the MTA team for their mod.
*/
on *:SIGNAL:mta.join:{
!.timer 1 0 mta.msg $1 $2 $mta.name($1,$2) $+ , the server is currently running the Timed Deathmatch script.
!.timer 1 1 mta.msg $1 $2 Type !rules for more info.
}
on *:SIGNAL:mta.command:{
if $3 == !rules {
!.timer 1 0 mta.say $1 DEATHMATCH SCRiPT RULES
!.timer 1 1 mta.say $1 No glitching/cheating/modding/helikilling/spawnkilling/carkilling.
}
elseif $3 == !info mta.say $1 Deathmatch Script by XcR, idea by Talidan.
;put in any names u want here... seperate with a space
elseif $findtok(xcr talidan,$mta.name($1,$2),1,32) {
if $3 == !start { mta.roundstart $1- }
elseif $3 == !stop { mta.gamefinish $1- }
}
}
alias mta.roundend {
var %e = $readini(roundsdone.ini,done,done)
!.timer 1 0 mta.say $1 Deathmatch script > Time limit of round %e is up!
!.timer 1 1 mta.topscore $1-
!.timer 1 2 mta.say $1 Everyone now must respawn - round is over.
!.timer 1 3 mta.kill1 $1-
!writeini roundsdone.ini done done $calc(%e + 1)
if %e == 3 { mta.gamefinish $1- }
}
alias mta.topscore {
var %a = 0,%b = 0,%c = 0
var %d = $readini(champ.ini,champpoints,$mta.name($1,%a))
while %a < 26 {
if $mta.score($1,%a) > %b { %b = $mta.score($1,%a) | %c = $mta.name($1,%a) }
!inc %a
!return The top scorer is %c with %b points!
}
!writeini champ.ini champpoints %c $calc(%d + 1)
!writeini champ.ini score %c %b
!.timer 5 60 mta.say $1 The champ of the last round was %c $+ , with a score of %b $+ !
mta.roundstart $1-
}
alias mta.kill1 {
var %a = 0
while %a < 26 {
if $mta.health($1,%a) > 0 { mta.slap $1 %a }
!inc %a
}
}
alias mta.roundstart {
var %e = $readini(roundsdone.ini,done,done)
!writeini roundsdone.ini done done 1
mta.say $1 Deathmatch round ' $+ %e $+ ' started.
!.timer 1 1800 mta.roundend $1-
mta.resetscores $1-
}
alias mta.gamefinish {
var %a = 0,%b = 0,%c = 0
var %d = $readini(champ.ini,champpoints,$mta.name($1,%a))
while %a < 26 {
if %d > %b { %b = %d | %c = $mta.name($1,%a) }
!inc %a
!return Deathmatch gamemode script ended: the winner of the game was %c with a champion score of %d $+ !
}
!.timer* off
}