Raised This Month: $ Target: $400
 0% 

If player is alive, it means, that he is connected to server?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 01-11-2015 , 09:18   Re: If player is alive, it means, that he is connected to server?
Reply With Quote #1

If a player is alive how he could not be connected to server ? So:
1. is_user_alive check if player is connected and if player is alive.
2. is_user_connected checks only if player is connected, it can be alive or dead.
3. checking just is_user_alive to know if player is connected or not is not accurate, because it can be dead but still connected(like he was killed during the round and wait for respawn).
__________________

Last edited by HamletEagle; 01-11-2015 at 09:18.
HamletEagle is offline
danonix
Senior Member
Join Date: Dec 2012
Old 01-11-2015 , 09:22   Re: If player is alive, it means, that he is connected to server?
Reply With Quote #2

Quote:
Originally Posted by HamletEagle View Post
If a player is alive how he could not be connected to server ? So:
1. is_user_alive check if player is connected and if player is alive.
2. is_user_connected checks only if player is connected, it can be alive or dead.
3. checking just is_user_alive to know if player is connected or not is not accurate, because it can be dead but still connected(like he was killed during the round and wait for respawn).
Well, I know that if is player alive, he must be connected to server, but though, that if player is not alive, it still means that he is connected to server because of this piece of code
Code:
 return((pPlayer->ingame && pPlayer->IsAlive()) ? 1 : 0);
But still - player in game ( returns 1 ) && player is alive( returns 1) - player alive - returns 1
player in game ( returns 1 ) && player is not alive ( returns 0 ) function returns 0
player in game ( returns 0 ) && player is not alive ( returns 0 ) function returns 0

So, if player is not alive i have to check, that if he is connected to server.
danonix 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 15:19.


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