RSSy MYGO.pl Opublikowano Sierpień 28, 2016 o 19:18 RSSy Udostępnij Opublikowano Sierpień 28, 2016 o 19:18 Simple Mysql WhitelistMysql database whitelister to control player access to server[s].Currently Tested [CSS] Description: Spoiler As i've seen some "Advanced" and "old/outdated" mysql whitelist's i decided to rewrite one more Simple yet functional whitelist to today's standards including all code being written in SourcePawn Transitional Syntax. Plugin used as Base: https://forums.alliedmods.net/showthread.php?t=162859 Requirements: A mysql database (obviously) Cvars: All cvars including menu requires Admin-Root access. sm_whitelist Opens the menu to list/remove sm_whitelist_add Add a steamid to the database. sm_whitelist_delete Deletes a steamid from the database. sm_whitelist_list List all SteamIDs in the database. Installation: Spoiler Step 1. Create a mysql database named mysql_whitelist <- This is the default name, Any named can be used, but it requires you to adjust the table name in the .sp file itself and have a recompile!Step 2. Goto your mysql database and make a new sql query with the following data: Code: SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; CREATE TABLE IF NOT EXISTS `mysql_whitelist` ( `steamid` text CHARACTER SET utf8 COLLATE utf8_danish_ci ) ENGINE=InnoDB DEFAULT CHARSET=latin1; Step 3. Throw the compiled smx into plugins folder.Step 4. Head to your addons\sourcemod\configs\databases.cfg and put the below with correct information. Code: "whitelister" //do not change this name { "driver" "mysql" "host" "Your hostname here" "database" "mysql_whitelist" //Database table name here "user" "Username here" "pass" "Password here" } Notice This!: Spoiler Once everything is set, you'll have to add yourself to the database, this is done by going to your mysql database name, then click it, and click the database table name, then you'll see a "insert" button click this, now you'll see a box where you simply put your steam2 id, they look like this STEAM_0:0:12345678 Then you click "GO" Then your done and ready to load up the server and connect! From there you can add steamids from ingame to database. Changelog: Code: 1.0 - Plugin release Attached Files Get Plugin or Get Source (simple_mysql_whitelist.sp - 10.8 KB) Wyświetl pełny artykuł Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
Rekomendowane odpowiedzi
Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto
Jedynie zarejestrowani użytkownicy mogą komentować zawartość tej strony.
Zarejestruj nowe konto
Załóż nowe konto. To bardzo proste!
Zarejestruj sięZaloguj się
Posiadasz już konto? Zaloguj się poniżej.
Zaloguj się