View Single Post
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 10-25-2018 , 11:00   Re: How to set SDKHook on round_start correctly?
Reply With Quote #17

Doesn't L4D only have like 8 players? Seems like this should suffice:

PHP Code:
public void OnClientPutInServer(int client)
{
    
SDKHook(clientSDKHook_OnTakeDamageOnTakeDamage);
}

public 
Action OnTakeDamage(int victimint &attackerint &inflictorfloat &damageint &damagetypeint &weaponfloat damageForce[3], float damagePosition[3])
{
    if (
GetClientTeam(victim) == 2) {
        return 
Plugin_Handled;
    }

    return 
Plugin_Continue;

__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.

Last edited by DJ Tsunami; 10-25-2018 at 11:00.
DJ Tsunami is offline