#Set this value to the number of rounds you want to be played before players are swapped teams maxrounds = 10 #If this is set to 1 it will swap teams when x rounds have passed. If set to 2 it will change teams after x rounds has been won by a sigle team win_type = 1 #Do not edit below this line #Simple War Mode Script By: J3ff #Requested Here: http://forums.mattie.info/cs/forums/viewtopic.php?t=20123 #Requested By: sicman_adrian import es, playerlib ctwin = 0 twin = 0 roundcount = 0 msglist = ['|-E--------|', '-VE-------|', '|-IVE------|', '|-LIVE-----|', '|--LIVE----|', '|---LIVE---|', '|----LIVE--|', '|-----LIVE-|', '|------LIV-|', '|-------LI-|', '|--------L-|', '|----------|'] endmsg = ['|-E--------|', '-VE-------|', '|-IVE------|', '|-LIVE-----|', '|--LIVE----|', '|---LIVE---|', '------------------------'] def load(): counter = 1 while counter <= 2: for msg in msglist: es.msg('#green', msg) counter += 1 for msg in endmsg: es.msg('#lightgreen', msg) for userid in playerlib.getUseridList('#all'): es.changeteam(userid, 1) def es_map_start(event_var): global roundcount roundcount = 0 for msg in endmsg: es.msg('#lightgreen', msg) def round_end(event_var): global roundcount global ctwin global twin if win_type == 1: roundcount += 1 if event_var['winner'] == '2': twin += 1 elif event_var['winner'] == '3': ctwin += 1 if roundcount >= maxrounds or ctwin >= maxrounds or twin >= maxrounds: roundcount = 0 es.msg('#multi', '#green[WarMode]#default teams changing sides...') for userid in playerlib.getUseridList('#all'): team = es.getplayerteam(userid) if team == 2: es.server.queuecmd('est_team %s 3'%userid) elif team == 3: es.server.queuecmd('est_team %s 2'%userid) es.server.queuecmd('est_removeweapon %s 1;est_removeweapon %s 2'%(userid, userid))