Raised This Month: $ Target: $400
 0% 

Get Damage in TF2


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 01-28-2008 , 12:43   Re: Get Damage in TF2
Reply With Quote #9

The include files have been working great, naris, but so far I've only ran into one problem. Your SaveAllHealth() stock (in damage.inc) checks to see if a player is Connected, and then checks to see if they're Alive. It completely skips checking to see if they're actually in-game yet. To remedy this, I made a temporary function of my own:

PHP Code:
SaveAllHealth2()
{
    new 
clients GetClientCount();
    for (new 
1<= clientsi++)
    {
        if (
IsClientConnected(i) && IsClientInGame(i) && IsPlayerAlive(i))
            
savedHealth[i] = GetClientHealth(i);
    }

bl4nk is offline
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:48.


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