Raised This Month: $ Target: $400
 0% 

kick if steam id doesn't match


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
GhostMan
Senior Member
Join Date: Jun 2012
Old 08-24-2013 , 05:54   kick if steam id doesn't match
Reply With Quote #1

I would like to have some steamids.ini file where i could write a list of available steam id's. If player connects to server with steam id which is not i my steamids.ini he would be kicked.

E.g. of steamids.ini:
Quote:
STEAM_0:1:111111111
STEAM_0:1:222222222
STEAM_0:133333333
etc...
I wrote a code which would do pretty much what i want but problem is i don't know how to integrate all that .INI file thing.

PHP Code:
#include <amxmodx>

new const PLUGIN[]  = "STEAM ID CHECKER"
new const VERSION[] = "1.0"
new const AUTHOR[]  = "me, i guess :O"

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
}

public 
client_putinserver(id)
{
    new 
authid[33]
    
get_user_authid(idauthidcharsmax(authid))
    
    if(!(
equali(authid"STEAM_0:1:111111111")))
    {
        
set_task(10.0"delay_kick"id)
    }
}

public 
client_disconnect(id)
{
    if(
task_exists(id))
        
remove_task(id)
}

public 
delay_kick(id)
{
    
server_cmd("kick #%d"get_user_userid(id))

Later on i will upgrade my code by showing message to players who are going to be kick like "You are going to be kick in X sec becouse missmatch of steam id!" or something like that but that's not the priority now.

Last edited by GhostMan; 08-24-2013 at 05:56.
GhostMan 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 18:56.


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