Raised This Month: $ Target: $400
 0% 

kick if steam id doesn't match


Post New Thread Reply   
 
Thread Tools Display Modes
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
sami_spt
Veteran Member
Join Date: Sep 2012
Location: I<3 pussy cats
Old 08-24-2013 , 06:06   Re: kick if steam id doesn't match
Reply With Quote #2

https://forums.alliedmods.net/showthread.php?t=222528

have a look @ this, check how he gets his idea.
sami_spt is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 08-24-2013 , 06:23   Re: kick if steam id doesn't match
Reply With Quote #3

Quote:
Originally Posted by sami_spt View Post
https://forums.alliedmods.net/showthread.php?t=222528

have a look @ this, check how he gets his idea.
or simply use amxx default settings already accessible...

amxx.cfg
Code:
// Mode of logging to a server
// 0 - disable logging, players won't be checked (and access won't be set)
// 1 - normal mode which obey flags set in accounts
// 2 - kick all players not on list
//
// Default value: 1
amx_mode 2
this will auto kick anyone NOT in the users.ini file...

add the players steam ids into users.ini file like so.
Users.ini
__________________
Blizzard_87 is offline
GhostMan
Senior Member
Join Date: Jun 2012
Old 08-25-2013 , 11:37   Re: kick if steam id doesn't match
Reply With Quote #4

delete this post.

Last edited by GhostMan; 08-25-2013 at 11:39.
GhostMan is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 08-25-2013 , 13:02   Re: kick if steam id doesn't match
Reply With Quote #5

Delete it yourself under edit->go advanced.
__________________
Black Rose is offline
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 08-26-2013 , 02:24   Re: kick if steam id doesn't match
Reply With Quote #6

Why would you want to delete this thread?

This is exactly the purpose of a forum, anyone who wanted to achieve the same has a reference to the solution.

Do not delete this!
mottzi is offline
Send a message via MSN to mottzi
GhostMan
Senior Member
Join Date: Jun 2012
Old 08-26-2013 , 08:22   Re: kick if steam id doesn't match
Reply With Quote #7

I was asking to delete #4 post, becouse i gave a question in which i found answer while writing that question.
GhostMan 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 18:56.


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