Quote:
Originally Posted by PurposeLessx
I have thought like this.
Code:
is_user_alive = pPlayer->ingame && pPlayer->IsAlive()
!is_user_alive = !(pPlayer->ingame && pPlayer->IsAlive())
So, Even if player is not in game, is_user_alive will be false. !is_user_alive will be true.
?
|
Well, if you're checking
is_user_alive, the game will return
true - if player is in game (connected) and alive.
false - if either player is not connected or not alive.
!is_user_alive, will return the same as is_user_alive just that now you're checking for the negative value.
This
if(!is_user_alive(id))
will return the same but you'll be checking (!)
not
So:
if(!is_user_alive(id))
Player not alive or not connected.