DW1 (click)
DW2 (click)
DW2 (click)
Код:
ui.add_combo("Rifles", "i_primary", { "None", "Auto", "Scout", "AWP"}, 0)
ui.add_combo("Pistols", "i_secondary", { "None", "Deagle/R8", "Duals", "Fiveseven/Tec9/Cz75"}, 0)
ui.add_combo("Other", "i_tertiary", { "None", "Other"}, 0)
local function buy_bot(event)
if event:get_name() == "round_prestart" then
--primary
if ui.get_int("i_primary") == 0 then
engine.execute_client_cmd(" ")
end
if ui.get_int("i_primary") == 1 then
engine.execute_client_cmd("buy scar20; buy g3sg1")
end
if ui.get_int("i_primary") == 2 then
engine.execute_client_cmd("buy ssg08")
end
if ui.get_int("i_primary") == 3 then
engine.execute_client_cmd("buy awp")
end
--secondary
if ui.get_int("i_secondary") == 0 then
engine.execute_client_cmd(" ")
end
if ui.get_int("i_secondary") == 1 then
engine.execute_client_cmd("buy revolver; buy deagle")
end
if ui.get_int("i_secondary") == 2 then
engine.execute_client_cmd("buy elite")
end
if ui.get_int("i_secondary") == 3 then
engine.execute_client_cmd("buy tec9; buy fiveseven")
end
--tertiary
if ui.get_int("i_tertiary") == 0 then
engine.execute_client_cmd(" ")
end
if ui.get_int("i_tertiary") == 1 then
engine.execute_client_cmd("buy hegrenade; buy molotov; buy incgrenade; buy smokegrenade; buy vesthelm; buy vest; buy defuser; buy taser")
end
end
end
client.register_callback("fire_game_event", buy_bot)
Последнее редактирование модератором: