-
Автор темы
- #1
Вызывать в FireGameEvent .
Settings.h
Settings.cpp
C++:
void CMisc::BuyBot(IGameEvent * event)
{
if (Interfaces::Engine()->IsInGame() && Interfaces::Engine()->IsConnected())
{
if (Settings::Bot::buy_enable)
{
if (strcmp(event->GetName(), "round_start"))
{
if (Settings::Bot::buy_pistol == 1)
{
Interfaces::Engine()->ClientCmd_Unrestricted2("buy elite");
}
if (Settings::Bot::buy_pistol == 2)
{
Interfaces::Engine()->ClientCmd_Unrestricted2("buy p250");
}
if (Settings::Bot::buy_pistol == 3)
{
Interfaces::Engine()->ClientCmd_Unrestricted2("buy fn57; buy tec9");
}
if (Settings::Bot::buy_pistol == 4)
{
Interfaces::Engine()->ClientCmd_Unrestricted2("buy deagle");
}
if (Settings::Bot::buy_rifle == 1)
{
Interfaces::Engine()->ClientCmd_Unrestricted2("buy famas");
Interfaces::Engine()->ClientCmd_Unrestricted2("buy galilar");
}
if (Settings::Bot::buy_rifle == 2)
{
Interfaces::Engine()->ClientCmd_Unrestricted2("buy ak47");
Interfaces::Engine()->ClientCmd_Unrestricted2("buy m4a1");
Interfaces::Engine()->ClientCmd_Unrestricted2("buy m4a1_silencer");
}
if (Settings::Bot::buy_rifle == 3)
{
Interfaces::Engine()->ClientCmd_Unrestricted2("buy ssg08");
}
if (Settings::Bot::buy_rifle == 4)
{
Interfaces::Engine()->ClientCmd_Unrestricted2("buy aug");
Interfaces::Engine()->ClientCmd_Unrestricted2("buy sg556");
}
if (Settings::Bot::buy_rifle == 5)
{
Interfaces::Engine()->ClientCmd_Unrestricted2("buy awp");
}
if (Settings::Bot::buy_rifle == 6)
{
Interfaces::Engine()->ClientCmd_Unrestricted2("buy scar20");
Interfaces::Engine()->ClientCmd_Unrestricted2("buy g3sg1");
}
if (Settings::Bot::buy_kevlar == 1)
{
Interfaces::Engine()->ClientCmd_Unrestricted2("buy vest");
}
if (Settings::Bot::buy_kevlar == 2)
{
Interfaces::Engine()->ClientCmd_Unrestricted2("buy vesthelm");
}
if (Settings::Bot::buy_kit == 1)
{
Interfaces::Engine()->ClientCmd_Unrestricted2("buy defuser");
}
if (Settings::Bot::buy_taser == 1)
{
Interfaces::Engine()->ClientCmd_Unrestricted2("buy taser");
}
}
}
}
}
C++:
namespace Bot
{
bool buy_enable = false;
int buy_rifle = 0;
int buy_pistol = 0;
int buy_kevlar = 0;
bool buy_kit = false;
bool buy_taser = false;
}
C++:
namespace Bot
{
extern bool buy_enable;
extern int buy_rifle;
extern int buy_pistol;
extern int buy_kevlar;
extern bool buy_kit;
extern bool buy_taser;
}