- Status
- Offline
- Joined
- Mar 1, 2020
- Messages
- 5
- Reaction score
- 0
This will reset your score automatically as soon as you die.
Put this in your FireGameEvent hook.
and add this as your listener.
Put this in your FireGameEvent hook.
C++:
if (!strcmp(name, "player_death"))
{
const auto attacker = g_pEngine->GetPlayerForUserID(event->GetInt("attacker"));
const auto userid = g_pEngine->GetPlayerForUserID(event->GetInt("userid"));
if (c_config::get().misc_autors)
{
auto victim = g_pEntityList->GetClientEntity(g_pEngine->GetPlayerForUserID(event->GetInt("userid")));
if (!victim)
return;
if (victim != Globals::LocalPlayer)
return;
g_pEngine->ExecuteClientCmd("rs");
}
and add this as your listener.
C++:
g_pEventManager->AddListener(this, "player_death", false);