View Single Post
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-05-2019 , 09:59   Re: [CSTRIKE] Player out of RANGE (0)
Reply With Quote #5

Quote:
Originally Posted by OciXCrom View Post
PHP Code:
(cs_get_user_team(id) == CS_TEAM_CT || CS_TEAM_T
This is incorrect as well. You can't check more than one statement like that. It needs to be:

PHP Code:
(cs_get_user_team(id) == CS_TEAM_CT || cs_get_user_team(id) == CS_TEAM_T
You should also store the "cs_get_user_team(id)" value in a variable because you will be using it more than once.
You can do:
PHP Code:
if ( CS_TEAM_T <= cs_get_user_teamid ) <= CS_TEAM_CT )
{
    
//T or CT
}
else
{
    
//unassigned or spectator

__________________

Last edited by Bugsy; 01-05-2019 at 10:02.
Bugsy is offline