Raised This Month: $ Target: $400
 0% 

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


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
danonix
Senior Member
Join Date: Dec 2012
Old 01-11-2015 , 09:00   If player is alive, it means, that he is connected to server?
Reply With Quote #1

Hello, I found this, and now I wonder, if player is not alive, it means, that he is connected to server or not?
@edit - wrong named topic - I meant IS NOT ALIVE, not ALIVE
PHP Code:
static cell AMX_NATIVE_CALL is_user_connected(AMX *amxcell *params/* 1 param */
{
    
int index params[1];
    
    if (
index || index gpGlobals->maxClients)
        return 
0;
    
    
CPlayerpPlayer GET_PLAYER_POINTER_I(index);
    
    return(
pPlayer->ingame 0);
}

extern bool g_bmod_tfc;
static 
cell AMX_NATIVE_CALL is_user_alive(AMX *amxcell *params/* 1 param */
{
    
int index params[1];
    
    if (
index || index gpGlobals->maxClients)
    {
        return 
0;
    }
    
    
CPlayerpPlayer GET_PLAYER_POINTER_I(index);

    if (
g_bmod_tfc)
    {
        
edict_t *pPlayer->pEdict;
        if (
e->v.flags FL_SPECTATOR || 
            (!
e->v.team || !e->v.playerclass))
        {
            return 
0;
        }
    }
    
    return((
pPlayer->ingame && pPlayer->IsAlive()) ? 0);


Last edited by danonix; 01-11-2015 at 09:02.
danonix 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 15:19.


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