AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [L4D2] infected_death event infected_id always = 0 (https://forums.alliedmods.net/showthread.php?t=188442)

saucex4 06-26-2012 11:39

[L4D2] infected_death event infected_id always = 0
 
EDIT: Ahh dammit, I posted it in the wrong section....so sorry

With the following code, I keep getting 0, everytime I kill a zombie.
My expectation is the entity ID of the zombie, but it never seems to work.

I've tried changing the key to "entityid" and "entity_id" just to see what would happen, but it's the same thing. Am I missing something here?

Code:

public OnPluginStart() {
    HookEvent("infected_death", Event_InfectedDeath);
}

public Event_InfectedDeath(Handle:event, const String:name[], bool:dontBroadcast) {
    if (g_deathDebug) {
        PrintToChatAll("infected_id = %d",GetEventInt(event,"infected_id"));
    }
}

Any help and/or solution is much appreciated, thank you!


All times are GMT -4. The time now is 06:11.

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