Новая ава блеять
-
Автор темы
- #1
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Вот и вторая часть.
Misc.cpp:
Misc.cpp:
Код:
else if (!strcmp(pEvent->GetName(), "bomb_begindefuse"))
{
std::vector<std::string> Defusing = { "DefusingBomb" };
auto say = "say ";
std::string msg = say + Defusing[rand() % Defusing.size()];
Interfaces::Engine()->ExecuteClientCmd(msg.c_str());
}
else if (!strcmp(pEvent->GetName(), "bomb_abortdefuse"))
{
std::vector<std::string> Cancel = { "CancelDefusing" };
auto say = "say ";
std::string msg = say + Cancel[rand() % Cancel.size()];
Interfaces::Engine()->ExecuteClientCmd(msg.c_str());
}
else if (!strcmp(pEvent->GetName(), "bomb_abortplant"))
{
std::vector<std::string> CancelPlanting = { "CancelPlanting" };
auto say = "say ";
std::string msg = say + CancelPlanting[rand() % CancelPlanting.size()];
Interfaces::Engine()->ExecuteClientCmd(msg.c_str());
}
else if (!strcmp(pEvent->GetName(), "bomb_beginplant"))
{
std::vector<std::string> Planting = { "PlantingBomb" };
auto say = "say ";
std::string msg = say + Planting[rand() % Planting.size()];
Interfaces::Engine()->ExecuteClientCmd(msg.c_str());
}
else if (!strcmp(pEvent->GetName(), "bomb_pickup"))
{
std::vector<std::string> BombPickup = { "BombPickup" };
auto say = "say ";
std::string msg = say + BombPickup[rand() % BombPickup.size()];
Interfaces::Engine()->ExecuteClientCmd(msg.c_str());
}
else if (!strcmp(pEvent->GetName(), "defuser_pickup"))
{
std::vector<std::string> DefuserPickup = { "DefuserPickup" };
auto say = "say ";
std::string msg = say + DefuserPickup[rand() % DefuserPickup.size()];
Interfaces::Engine()->ExecuteClientCmd(msg.c_str());
}
else if (!strcmp(pEvent->GetName(), "defuser_dropped"))
{
std::vector<std::string> DefuserDropped = { "DefuserDropped" };
auto say = "say ";
std::string msg = say + DefuserDropped[rand() % DefuserDropped.size()];
Interfaces::Engine()->ExecuteClientCmd(msg.c_str());
}
else if (strcmp(pEvent->GetName(), "player_spawned") == 0)
{
int join = pEvent->GetInt("userid");
int player = Interfaces::Engine()->GetLocalPlayer();
if (join)
{
std::vector<std::string> Hello = { "Hello!" };
auto say = "say ";
std::string msg = say + Hello[rand() % Hello.size()];
Interfaces::Engine()->ExecuteClientCmd(msg.c_str());
if (player)
{
std::vector<std::string> Hello = { "Hello!" };
auto say = "say ";
std::string msg = say + Hello[rand() % Hello.size()];
Interfaces::Engine()->ExecuteClientCmd(msg.c_str());
}
}
}
else if (strcmp(pEvent->GetName(), "player_disconnect") == 0)
{
int join = pEvent->GetInt("userid");
int player = Interfaces::Engine()->GetLocalPlayer();
if (join)
{
std::vector<std::string> Goodbye = { "Goodbye;)" };
auto say = "say ";
std::string msg = say + Goodbye[rand() % Goodbye.size()];
Interfaces::Engine()->ExecuteClientCmd(msg.c_str());
if (player)
{
std::vector<std::string> Goodbye = { "Goodbye;)" };
auto say = "say ";
std::string msg = say + Goodbye[rand() % Goodbye.size()];
Interfaces::Engine()->ExecuteClientCmd(msg.c_str());
}
}
}
else if (strcmp(pEvent->GetName(), "round_prestart") == 0)
{
std::vector<std::string> Goodbye = { "RoundStarted" };
auto say = "say ";
std::string msg = say + Goodbye[rand() % Goodbye.size()];
Interfaces::Engine()->ExecuteClientCmd(msg.c_str());
}
}