View Single Post
Root_
Veteran Member
Join Date: Jan 2012
Location: ryssland
Old 07-06-2013 , 08:04   Re: [CSS] Regarding Pre Player_Death event
Reply With Quote #7

dilalmon, I also tried to hook pre-death event to check player's weapons, but it wasnt worked properly.
GetPlayerWeaponSlot is returning -1 if player is dead, so I have to check player's health right before player dies, and it worked!

Code:
HookEvent("player_hurt",  OnPlayerDeath); ... public OnPlayerDeath(Handle:event, const String:name[], bool:dontBroadcast) {     new client = GetClientOfUserId(GetEventInt(event, "userid"));     if (GetClientHealth(client) < 1)     {         //blah     }
__________________


dodsplugins.com - Plugins and Resources for Day of Defeat
http://twitch.tv/zadroot
Root_ is offline