View Single Post
jonatat
Senior Member
Join Date: Dec 2017
Old 04-21-2021 , 05:48   Re: Do not kick if HLTV
Reply With Quote #6

Quote:
Originally Posted by Bugsy View Post
Like this:
PHP Code:
public client_authorized(id

    if ( !
is_user_hltvid ) )
    {
        new 
auth[32]; 
        
get_user_authid(idauthsizeof (auth));
        
        new 
Handle:query SQL_PrepareQuery(g_sql"SELECT `steam_id` FROM `users` WHERE (`steam_id` = '%s')"auth); 
        
SQL_Execute(query); 
        
        new 
res[32]; 
        
        if (
SQL_MoreResults(query)) 
        { 
            
SQL_ReadResult(query0ressizeof (res)); 
            
SQL_FreeHandle(query); 
        } 
        
        if (!
strlen(res)) 
        { 
            
server_cmd("kick #%i %s"get_user_userid(id), restrict_msg); 
        }
    }


My bad, working! Thanks!

Last edited by jonatat; 04-21-2021 at 05:51.
jonatat is offline