AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   invalid player (https://forums.alliedmods.net/showthread.php?t=223701)

GhostMan 08-16-2013 08:41

invalid player
 
PHP Code:

public msgScreenFade(iMsgIdiMsgDestid)
{
    if(
get_msg_arg_int(4) == 255 && get_msg_arg_int(5) == 255 && get_msg_arg_int(6) == 255)
    {
        if(
cs_get_user_team(id) == CS_TEAM_T && get_pcvar_num(g_pNoFlash
            || 
cs_get_user_team(id) == CS_TEAM_CT && g_iTimer 0)
        {
            return 
PLUGIN_HANDLED;
        }
    }
    
    return 
PLUGIN_CONTINUE;


Quote:

L 08/12/2013 - 11:27:24: [CSTRIKE] Invalid player 6
L 08/12/2013 - 11:27:24: [AMXX] Displaying debug trace (plugin "hns.amxx")
L 08/12/2013 - 11:27:24: [AMXX] Run time error 10: native error (native "cs_get_user_team")
L 08/12/2013 - 11:27:24: [AMXX] [0] hns.sma::msgScreenFade (line 447)
That is Jon's plugin, but he is not really supports it anymore. http://forums.alliedmods.net/showthread.php?t=73244

Stereo 08-16-2013 10:33

Re: invalid player
 
Check is_user_connected before cs_get_user_team

DWIGHTpN 08-17-2013 11:08

Re: invalid player
 
PHP Code:

public msgScreenFade(iMsgIdiMsgDestid

    if(
get_msg_arg_int(4) == 255 && get_msg_arg_int(5) == 255 && get_msg_arg_int(6) == 255
    {
        if( 
is_user_connected(id) ) {
               new 
CsTeams:iTeam cs_get_user_team(id);
               if(
iTeam == CS_TEAM_T && get_pcvar_num(g_pNoFlash)  
               || 
iTeam == CS_TEAM_CT && g_iTimer 0
              { 
                  return 
PLUGIN_HANDLED
               }
         }
     } 
     
    return 
PLUGIN_CONTINUE




All times are GMT -4. The time now is 15:56.

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