What it does
If someone is not in your MySql database they will get kicked, also. You can setup immunity up for a group, or someone with a special flag.
Features
You can add or delete SteamIDs from in-game if you have the root flag, you can edit the source if you want it to be another flag.
It's also possible to get a list of all the SteamIDs in the database with one command.
Commands- sm_steamid_restrict_add <steamid> - Adds a SteamID to the database.
- sm_steamid_restrict_delete <steamid> - Deletes a SteamID from the database.
- sm_steamid_restrict_list - Outputs all the SteamIDs in the database to console.
CVars- sm_steamid_restrict_version - SteamID Restrict Version (unchangeable).
- sm_steamid_restrict_type - Should groups or admins with a flag be immune to being kicked (1 = Group, 2 = flag, 0 = disabled).
- sm_steamid_restrict_group - What is the group name of the admins that should be immune (sm_steamid_restrict_type needs to be 1 for this).
- sm_steamid_restrict_flag - What flag should a admin need to be immune of being kicked, look in admin_levels.cfg for flags (sm_steamid_restrict_type needs to be 2 for this).
- sm_steamid_restrict_bots - Should bots be allowed to join the server (0 = no, 1 = yes).
Config file will automatic be generated in "cfg/sourcemod/sm_steamid_restrict.cfg".
Installation
First you need to make a database for this plugin. Now download "steamid_restrict.sql.txt" and rename it to "steamid_restrict.sql".
Now import "steamid_restrict.sql" to the database you just created.
After that open you databases.cfg located at "addons/sourcemod/configs/databases.cfg" and add the following.
PHP Code:
"restrict"
{
"driver" "default"
"host" "address_to_mysql"
"database" "database_name_in_mysql"
"user" "username_to_mysql"
"pass" "password_to_mysql"
//"timeout" "0"
//"port" "0"
}
Ex.
PHP Code:
"restrict"
{
"driver" "default"
"host" "localhost"
"database" "restrict"
"user" "root"
"pass" ""
//"timeout" "0"
//"port" "0"
}
Now just place the steamid_restrict.sp in "addons/sourcemod/scripting", and steamid_restrict.smx in "addons/sourcemod/plugins".
So now you are ready, just restart your server configure the file at "cfg/sourcemod/sm_steamid_restrict.cfg" to what you like, and restart again.
Changelog
Quote:
2011-07-23 (1.0.0)
* Initial release
|
Credits
sEbbo for making the first MySql plugin for this
this thread.
BAILOPAN for creating the original plugin, but it stored the persons in a file.
And the folks in
this thread for showing me the basic and give me a start code.
ejik03 for showing me how to see if a person is in a group
here.
dataviruset for looking at his code and see how he checked for the admins flag, and compare it in
SM_Hosties
That was a pretty long credits list, but that's how it's.
I mostly just look at other code and put something together from that.
Please report any bugs you find or if you have a suggestion(s) just write a PM to me or write here.