Post: bool isdead() exist?
08-20-2015, 06:01 PM #1
seanhellen
Are you high?
(adsbygoogle = window.adsbygoogle || []).push({}); Hi everyone. Just wondering if there is a function to see if you are dead...like the bool ingame(); - I ask as I want my tool to do stuff when I die.

Thanks
(adsbygoogle = window.adsbygoogle || []).push({});
08-24-2015, 05:40 PM #2
Originally posted by seanhellen View Post
Hi everyone. Just wondering if there is a function to see if you are dead...like the bool ingame(); - I ask as I want my tool to do stuff when I die.

Thanks

You can just monitor the player's health in G_Client(or G_Enitity) and compare it to 0, if it's equal to 0, then make it return true :p
So, here's a sample code that you can use:
    
bool isDead(int Client)
{
return *(int*)(G_Client(Client)+0x322Cool Man (aka Tustin) == 0;
}
08-24-2015, 06:40 PM #3
seanhellen
Are you high?
Originally posted by John View Post
You can just monitor the player's health in G_Client(or G_Enitity) and compare it to 0, if it's equal to 0, then make it return true :p
So, here's a sample code that you can use:
    
bool isDead(int Client)
{
return *(int*)(G_Client(Client)+0x322Cool Man (aka Tustin) == 0;
}


Ah, thats a good idea, thanks for that Smile

Just slightly confused...does the return only work (and return true) if the g_client == 0?
08-24-2015, 06:41 PM #4
Originally posted by seanhellen View Post
Ah, thats a good idea, thanks for that Smile

Just slightly confused...does the return only work (and return true) if the g_client == 0?

It will return true if the health(integer that we read at g_client + 0x322Cool Man (aka Tustin) is equal to 0, otherwise will return false
08-24-2015, 07:16 PM #5
seanhellen
Are you high?
Great. Thanks for the idea Cool Man (aka Tustin)

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo