JS [WEAVE] Warmup setup & maps

  • 85
  • 12
JavaScript:
ui.add_checkbox("[Local Server] Warmup settings", "warmupsetts")
ui.add_combo("[Local Server] Features", "deat", ['None', 'Godmode', 'Bot add CT', 'Bot add T', 'Kick bots'], 0)
ui.add_combo('[Local Server] Map choose', "mapchoice", ['None', 'Nuke', 'Mirage', 'Dust 2', 'Overpass', 'Vertigo', 'Office', 'Inferno', 'Cobblestone', 'Shortdust'], 0)
const setup = [
    'sv_cheats 1',
    'mp_roundtime_defuse 60',
    'sv_infinite_ammo 1',
    'mp_freezetime 0',
    'mp_maxmoney 16000',
    'mp_startmoney 16000',
    'mp_maxrounds 999',
    'mp_buy_anywhere 1',
    'mp_buytime 9999999999999',
    'sv_airaccelerate 100',
    'mp_restartgame 1',
    'clear'
]

const items = {

    maps: {
        1: 'de_nuke',
        2: 'de_mirage',
        3: 'de_dust2',
        4: 'de_overpass',
        5: 'de_vertigo',
        6: 'cs_office',
        7: 'de_inferno',
        8: 'de_cbble',
        9: 'de_shortdust'
    },

    features: {
        1: 'god',
        2: 'bot_add_ct',
        3: 'bot_add_t',
        4: 'bot_kick'
    }

}

function warmup() {
    if(vars.get_int("js.warmupsetts")) {
         for(cmds in setup) {
            cheat.execute_command(setup[cmds])
        }
        vars.set_int("js.warmupsetts", 0)
    }
}

function features() {
    for(var feature in items.features) {
          if(vars.get_int("js.deat") == feature) {
              cheat.execute_command(items.features[feature])
              vars.set_int("js.deat", 0)
          }
    }
}

function mapChoose() {
    for(var map in items.maps) {
        if(vars.get_int("js.mapchoice") == map) {
            cheat.execute_command('map ' + items.maps[map])
            vars.set_int("js.mapchoice", 0)
        }
    }
}
register_callback("createmove", features)
register_callback("createmove", mapChoose)
register_callback("createmove", warmup)
Credits: Mased
 
  • 278
  • 82
А в чем сложность через алиас и бинд прописать такое же через консоль ксго?
 
Сверху Снизу