Raised This Month: $ Target: $400
 0% 

other way in checking user alive


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
whosyourdaddy
Senior Member
Join Date: Apr 2008
Old 01-29-2009 , 22:34   other way in checking user alive
Reply With Quote #1

other than using is_user_alive is there another check i can do?
whosyourdaddy is offline
jim_yang
Veteran Member
Join Date: Aug 2006
Old 01-29-2009 , 22:44   Re: other way in checking user alive
Reply With Quote #2

any special reason ?
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
whosyourdaddy
Senior Member
Join Date: Apr 2008
Old 01-29-2009 , 23:02   Re: other way in checking user alive
Reply With Quote #3

ya for some reason is_user_alive(id) is returning false when it should be true
whosyourdaddy is offline
zwfgdlc
Senior Member
Join Date: May 2006
Old 01-29-2009 , 23:05   Re: other way in checking user alive
Reply With Quote #4

try
PHP Code:
// pev(entity, pev_deadflag) values
#define    DEAD_NO                         0           // Alive
#define    DEAD_DYING                      1           // Playing death animation or still falling off of a ledge waiting to hit ground
#define    DEAD_DEAD                       2           // Dead, lying still
#define DEAD_RESPAWNABLE                3
#define DEAD_DISCARDBODY                4 
zwfgdlc is offline
whosyourdaddy
Senior Member
Join Date: Apr 2008
Old 01-29-2009 , 23:21   Re: other way in checking user alive
Reply With Quote #5

Quote:
Originally Posted by zwfgdlc View Post
try
PHP Code:
// pev(entity, pev_deadflag) values
#define    DEAD_NO                         0           // Alive
#define    DEAD_DYING                      1           // Playing death animation or still falling off of a ledge waiting to hit ground
#define    DEAD_DEAD                       2           // Dead, lying still
#define DEAD_RESPAWNABLE                3
#define DEAD_DISCARDBODY                4 
would it look like this
Code:
(pev(id,pev_deadflag) & DEAD_DYING)
to check it a player is dead?
whosyourdaddy is offline
jim_yang
Veteran Member
Join Date: Aug 2006
Old 01-29-2009 , 23:09   Re: other way in checking user alive
Reply With Quote #6

amxx use this to check is_user_alive
Code:
inline bool IsAlive()
{
    return ((pEdict->v.deadflag == DEAD_NO) && (pEdict->v.health > 0));
}
you can try get_pdata_int(id, 113)
but is_user_alive(id) is faster in any situation except you cache the flag in your own plugin
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
zwfgdlc
Senior Member
Join Date: May 2006
Old 01-29-2009 , 23:33   Re: other way in checking user alive
Reply With Quote #7

Code:
(pev(id,pev_deadflag) == DEAD_DYING)
zwfgdlc is offline
IneedHelp
Veteran Member
Join Date: Mar 2007
Location: Argentina
Old 01-30-2009 , 00:09   Re: other way in checking user alive
Reply With Quote #8

PHP Code:
client_print(idprint_chat"%s"ExecuteHam(Ham_IsAliveid) ? "alive" "dead"
I was using that to test some func on ham

so..

PHP Code:
if (ExecuteHam(Ham_IsAliveindex))
            
// alive 
__________________

Last edited by IneedHelp; 01-30-2009 at 00:19.
IneedHelp is offline
whosyourdaddy
Senior Member
Join Date: Apr 2008
Old 01-30-2009 , 01:16   Re: other way in checking user alive
Reply With Quote #9

which would be prefered ham or fakemeta?
whosyourdaddy is offline
whosyourdaddy
Senior Member
Join Date: Apr 2008
Old 01-30-2009 , 04:47   Re: other way in checking user alive
Reply With Quote #10

how can do do a check where this ent touches something and that something isnt a player
whosyourdaddy is offline
Reply



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 01:37.


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