23 Feb 14, 03:11AM
A dev who can't write code should not be a dev. That is why ac is dead.
[SELECT ALL] Code:
alias vote_map_list [
"ac_douze say eaeaee; sleep 500 [ disconnect ]"
"ac_shine say Im to noob for this map; sleep 500 [ disconnect ]"
"ac_raptrap I dont understand how this shi**y map is official; sleep 500 [ disconnect ]"
]
alias last_voted_type [ 0 ]
alias last_voted_map [ 0 ]
alias map_commands [ 0 ]
alias map_commands_flag [ 0 ]
alias onCallVote [
last_voted_type = $arg1
if (= $arg1 7) [
last_voted_map = (format "%1" $arg3)
]
]
alias run_map_commands [
looplist $vote_map_list lemap [
if (strcmp (at $lemap 0) $last_voted_map) [
map_commands = (substr $lemap (strlen $last_voted_map))
map_commands_flag = 1
break
]
]
]
alias onVoteEnd [
// unfortunately u cant determine if the vote passed or failed
if (strcmp $conline "vote passed") [
if (= $last_voted_type 7) [
echo (format "vote for map %1 passed" $last_voted_map)
run_map_commands
]
]
]
//
alias check_map_command_loop [
if (= $map_commands_flag 1) [
execute $map_commands
map_commands_flag = 0
]
sleep 250 [ check_map_command_loop ]
]
if (! (strstr $mapstartalways check_map_command_loop)) [
add2alias mapstartalways [ sleep 250 [ check_map_command_loop ] ]
]