Raised This Month: $ Target: $400
 0% 

if(get_user_authid(id) >= STEAM_0:1:55555555)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
pupil0888
Member
Join Date: Sep 2012
Location: Venezuela
Old 07-08-2014 , 04:55   if(get_user_authid(id) >= STEAM_0:1:55555555)
Reply With Quote #1

dont work

Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>

public plugin_init() {
    register_plugin("kovalsky_plugin", "1.0", "kovalsky")
    register_cvar("koval_plugin", "1")
}

public client_connect(id) {
    
    if(get_cvar_num("koval_plugin") == 0) {
        return PLUGIN_HANDLED
    }

    if(get_user_authid(id) >= STEAM_0:1:55555555) {
        
	server_cmd("kick #%d", get_user_authid(id))
    }
    return PLUGIN_HANDLED
}
pupil0888 is offline
Send a message via MSN to pupil0888
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 07-08-2014 , 05:26   Re: if(get_user_authid(id) >= STEAM_0:1:55555555)
Reply With Quote #2




Please actually try reading the tutorials and guides before you start scripting. I mean, the thread that you bumped (and I deleted the bump) had the solution to your "problem"
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).

Last edited by YamiKaitou; 07-08-2014 at 05:26.
YamiKaitou is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 07-08-2014 , 05:40   Re: if(get_user_authid(id) >= STEAM_0:1:55555555)
Reply With Quote #3

You have to use str_to_num() to convert the last digits to an integer that can be compared using >=.
Also, when kicking using #, you supply the userid, not authid.

What is it even for? It makes no sense to block a range of SteamIDs.
__________________
Black Rose is offline
pupil0888
Member
Join Date: Sep 2012
Location: Venezuela
Old 07-08-2014 , 06:56   Re: if(get_user_authid(id) >= STEAM_0:1:55555555)
Reply With Quote #4

Quote:
Originally Posted by Black Rose View Post
You have to use str_to_num() to convert the last digits to an integer that can be compared using >=.
Also, when kicking using #, you supply the userid, not authid.

What is it even for? It makes no sense to block a range of SteamIDs.
I do not understand, plis help me.
pupil0888 is offline
Send a message via MSN to pupil0888
Kellan123
AlliedModders Donor
Join Date: Aug 2012
Old 07-08-2014 , 10:16   Re: if(get_user_authid(id) >= STEAM_0:1:55555555)
Reply With Quote #5

PHP Code:
#include <amxmodx>

public plugin_init() 
{
      
register_plugin("kovalsky_plugin""1.0""kovalsky");
      
      
register_cvar("koval_plugin""1");
}

public 
client_connect(id)
{
      if ( 
get_cvar_num("koval_plugin") == ) return PLUGIN_HANDLED;
      
      static 
authid[32];
      
get_user_authid(idauthidcharsmax(authid));
      
      if ( 
equal(authid"STEAM_0:1:55555555") )
      {
            
server_cmd("kick #%i"get_user_userid(id));
      }
      
      return 
PLUGIN_HANDLED;


Last edited by Kellan123; 07-08-2014 at 10:19.
Kellan123 is offline
pupil0888
Member
Join Date: Sep 2012
Location: Venezuela
Old 07-08-2014 , 14:52   Re: if(get_user_authid(id) >= STEAM_0:1:55555555)
Reply With Quote #6

Quote:
Originally Posted by Kellan123 View Post
PHP Code:
#include <amxmodx>

public plugin_init() 
{
      
register_plugin("kovalsky_plugin""1.0""kovalsky");
      
      
register_cvar("koval_plugin""1");
}

public 
client_connect(id)
{
      if ( 
get_cvar_num("koval_plugin") == ) return PLUGIN_HANDLED;
      
      static 
authid[32];
      
get_user_authid(idauthidcharsmax(authid));
      
      if ( 
equal(authid"STEAM_0:1:55555555") )
      {
            
server_cmd("kick #%i"get_user_userid(id));
      }
      
      return 
PLUGIN_HANDLED;


what I want is that if someone connects to the server and authid is higher than this STEAM_0: 1:55555555 Server kicked him
pupil0888 is offline
Send a message via MSN to pupil0888
pupil0888
Member
Join Date: Sep 2012
Location: Venezuela
Old 07-08-2014 , 06:55   Re: if(get_user_authid(id) >= STEAM_0:1:55555555)
Reply With Quote #7

I do not understand, plis help me.
pupil0888 is offline
Send a message via MSN to pupil0888
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 07-08-2014 , 16:14   Re: if(get_user_authid(id) >= STEAM_0:1:55555555)
Reply With Quote #8

str_to_num(authid[10])
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 07-08-2014 , 16:32   Re: if(get_user_authid(id) >= STEAM_0:1:55555555)
Reply With Quote #9

I just don't understand why would you want that...
Backstabnoob is offline
Reply



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 21:13.


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