OnPlayerGiveDamage / TakeDamage
#4

Your going about it all wrong, you need to create your own OnPlayerDeath() callback, then call it from OnPlayerGiveDamage / OnPlayerTakeDamage now there is a problem with this unless you set everyone to the same team there is a possibility that the shot will also sync on their screen resulting in double damage. There is a way around this by waiting 300ms to see if the player has taken any damage in that time if so then don't issue the GiveDamage if they're dead send a message to your OnPlayerDeath() of course this would be named something like OnPlayerDeathByPass() as your OnPlayerDeath() callback should just return 1. You will also need to mark the player as dead with some variable then check on each death with OnPlayerStateChange() just in case the death was not registered correctly which can happen, in which case you would call OnPlayerDeath().
Reply


Messages In This Thread
OnPlayerGiveDamage / TakeDamage - by PrawkC - 09.01.2012, 23:09
Re: OnPlayerGiveDamage / TakeDamage - by [HiC]TheKiller - 09.01.2012, 23:27
Re: OnPlayerGiveDamage / TakeDamage - by PrawkC - 09.01.2012, 23:41
Re: OnPlayerGiveDamage / TakeDamage - by Pottus - 15.09.2012, 06:24

Forum Jump:


Users browsing this thread: 2 Guest(s)