-
Автор темы
- #1
Hello bois, today i will show to u how to add Kill Say for ur paste
1. Add a int in CStructManager.h
2. go to FireEventClientSide.h and create a void, call in player_death event
3. go to void player_death(IGameEvent* game_event) and make that
4. go to round_start void and put that
5. go to CGameEventListener variables and write that '-------'
6. go to RegListeners and put that
To make a bool to enable kill say u will need to have brain
1. Add a int in CStructManager.h
Код:
int kills;
Код:
void KillSay(IGameEvent* evento)
{
const auto localPlayer = csgo->local;
if (!localPlayer || !localPlayer->isAlive())
return;
if (interfaces.engine->GetPlayerForUserID(evento->GetInt("attacker")) != localPlayer->EntIndex() || interfaces.engine->GetPlayerForUserID(evento->GetInt("userid")) == localPlayer->EntIndex())
return;
switch (csgo->kills)
{
case 1:
interfaces.engine->ClientCmd_Unrestricted("say Ez kill nn dog!");
break;
}
// u can make more cases
}
Код:
void player_death(IGameEvent* game_event) {
int attacker = interfaces.engine->GetPlayerForUserID(game_event->GetInt("attacker"));
int iLocalPlayer = interfaces.engine->GetLocalPlayer();
if (vars.visuals.kill_effect && csgo->local && csgo->local->isAlive() && attacker == iLocalPlayer)
{
// u can delete the check if kill effect is enable
csgo->local->HealthShotBoostExpirationTime() = interfaces.global_vars->curtime + 1.f;
csgo->kills++;
}
}
Код:
csgo->kills = 0;
Код:
CGameEventListener* _killsay;
Код:
REG_EVENT_LISTENER(_killsay, &KillSay, "player_death", false); //in "&KillSay" call u'r killsay void
Последнее редактирование: