CS GO buybot
Im doing a listbox with imgui
ImGui::ListBoxHeader("##buyweapons", ImVec2(226, 300));
{
for (int i = 0; i < ARRAYSIZE(buyBotWeapons); i++)
{
if (ImGui::Selectable(buyBotWeapons[i], options->Buybot.bBuyWeapon[i])) options->Buybot.bBuyWeapon[i] = !options->Buybot.bBuyWeapon[i];
}
}
ImGui::ListBoxFooter();
then on round_start
for (int i = 0; i < ARRAYSIZE(buyBotWeapons); i++)
{
if (options->Buybot.bBuyWeapon[i])
interfaces->g_pEngine->ClientCmd_Unrestricted(buyBotWeapons[i]);
}
this can probably be improved but i was bored and wanted to do something
const char* buyBotWeapons[] =
{
"buy glock",
"buy hkp2000",
"buy usp_silencer",
"buy elite",
"buy p250",
"buy tec9",
"buy fn57",
"buy deagle",
"buy galilar",
"buy famas",
"buy ak47",
"buy m4a1",
"buy m4a1_silencer",
"buy ssg08",
"buy aug",
"buy sg556",
"buy awp",
"buy scar20",
"buy g3sg1",
"buy nova",
"buy xm1014",
"buy mag7",
"buy m249",
"buy negev",
"buy mac10",
"buy mp9",
"buy mp7",
"buy ump45",
"buy p90",
"buy bizon"
};
|