Quote:
Originally Posted by Flynn
Don't take this as a personal attack or anything (just trying to address a problem), but it strikes me a lot of events you use don't seem to fire. Are you sure you know how to correctly setup an event to fire?
Could I have an example from one of your event setups? 
|
yea, its all good.
i used this to test if getting killed by the bomb passed along something i can use. it printed info for every death. but getting killed by the bomb didnt print anything.
PHP Code:
public OnPluginStart()
{
HookEvent("player_death", EventPlayerDeath);
}
public EventPlayerDeath(Handle:event,const String:name[],bool:dontBroadcast)
{
new attacker = GetClientOfUserId(GetEventInt(event,"attacker"));
new String:WeaponName[32];
GetEventString(event, "weapon", WeaponName, sizeof(WeaponName));
PrintToChatAll("weapon %s", WeaponName);
PrintToChatAll("attacker %d", attacker);
}
as for testing
SetEntProp(client, Prop_Data, "m_takedamage", 1, 1);
i plugged it into an already working plugin where i simply give the players hp back. but it broke the plugin. none of the actions taken on player_hurt worked.