AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   [REQ][TF2] Block death events if standing within trigger (https://forums.alliedmods.net/showthread.php?t=330924)

Sreaper 02-27-2021 00:46

[REQ][TF2] Block death events if standing within trigger
 
I'm not sure how I would write this. I'm requesting a completed plugin rather than 'sdkhooks -> do something' for a response since that won't help me that much at my current programming skill level.
So far I have this:
Code:

public OnPluginStart()
{
    HookEvent("player_death", Event_PlayerDeath, EventHookMode_Pre);
    HookEvent("medic_death", Event_MedicDeath, EventHookMode_Pre);
}

public Action:Event_PlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)
{
    dontBroadcast = true;
    return Plugin_Handled;
}

public Action:Event_MedicDeath(Handle:event, const String:name[], bool:dontBroadcast)
{
    dontBroadcast = true;
    return Plugin_Handled;
}

This blocks the kill messages just fine. However since this is for my idle server I only want to block these messages if the person was standing within a trigger_push at the time of their death as opposed to all the time. Would anyone be able to help me add the missing parts to the script? Thank you for reading.


All times are GMT -4. The time now is 19:51.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.