Raised This Month: $ Target: $400
 0% 

Engine invalid player


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Netsys
Senior Member
Join Date: Feb 2010
Old 12-19-2015 , 00:30   Engine invalid player
Reply With Quote #1

What's the problem? I check if the player is connected and alive, but i have the error. This happens sometimes when a player crash with some kind of error keeps on timeout un the server anda then disconnects

PHP Code:
L 12/19/2015 02:13:03: [ENGINEInvalid player 2 (not in-game)
L 12/19/2015 02:13:03: [AMXXDisplaying debug trace (plugin "semiclip.amxx"version "0.7")
L 12/19/2015 02:13:03: [AMXXRun time error 10native error (native "entity_range")
L 12/19/2015 02:13:03: [AMXX]    [0semiclip.sma::thinkSemiclip (line 3803
PHP Code:
/* Bits Management */
#define setBit(%1,%2)                             (%1 |= (1<<(%2 & 31)))
#define getBit(%1,%2)                             (%1 & (1<<(%2 & 31)))
#define delBit(%1,%2)                             (%1 &= ~(1<<(%2 & 31)))

#define is_user_valid_alive(%1)                 ((1 <= %1 <= MaxClients) && getBit(g_iPlayerBits[%1], bPlayerIsConnected) && getBit(g_iPlayerBits[%1], bPlayerIsAlive))


public client_putinserveriPlayerID )
{
    
/* Reset bits */
    
g_iPlayerBits[iPlayerID] = 0;

    
/* Set the default bits value */
    
setBit(g_iPlayerBits[iPlayerID], bPlayerIsConnected);
}

public 
client_disconnectediPlayerID )
{
    
/* Reset the bits */
    
g_iPlayerBits[iPlayerID] = 0;
}

/* Ham Player Spawn Post Forward */
public fw_PlayerSpawn_Post( const iPlayerID )
{
    
/* Not alive or didn't join a team yet */
    
if (!is_user_alive(iPlayerID) || !get_user_team(iPlayerID))
        return;

    
/* Update bits */
    
setBit(g_iPlayerBits[iPlayerID], bPlayerIsAlive);
}

/* Ham Player Killed Forward */
public fw_PlayerKilled( const iVictimID, const iAttackerID, const iShouldgib )
{
    
/* Update bits */
    
delBit(g_iPlayerBits[iVictimID], bPlayerIsAlive);
}

public 
thinkSemiclip( const iEntityID )
{
    static 
iTargetIDiDistance;
    
    for (
iPlayerID 1iPlayerID MaxClientsiPlayerID++)
    {
        if (!
is_user_valid_alive(iPlayerID)) continue;
        
        for (
iTargetID iPlayerID 1iTargetID <= MaxClientsiTargetID++)
        {
            if (!
is_user_valid_alive(iTargetID)) continue;
            
            
/* Get the distance between the players */
            
iDistance floatround(entity_range(iPlayerIDiTargetID)); // This line

            
g_iPlayerRange[iPlayerID][iTargetID] = ((iDistance <= 250) ? iDistance : -1);
            
g_iPlayerRange[iTargetID][iPlayerID] = g_iPlayerRange[iPlayerID][iTargetID];
        }
    }

    
entity_set_float(iEntityIDEV_FL_nextthinkget_gametime() + 0.1);


Last edited by Netsys; 12-19-2015 at 14:35.
Netsys is offline
 



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 17:51.


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