Skocz do zawartości

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie

[ANY] Threaded Mysql Bans


  • Nie możesz napisać tematu
  • Zaloguj się, aby dodać odpowiedź
Brak odpowiedzi do tego tematu

#1 Adminek AMXX.PL

    Admin :)

  • Bot

Reputacja: 156
Profesjonalista

  • Postów:7 490
  • Lokalizacja:AMXX.PL
Offline

Napisano 28.07.2012 16:38

Credits:Originally coded by MoggieX - Stripped and rebuilt to be threadedTarget AudienceThis plugin is aimed at server operators that require to have a single point of reference for all thier game server bans.What does it do?Writes bans to the MySQL database and kicks any users with matching bans as they attempt to join. For timed bans, the ban will automatically delete itself from the database on the next connection attempt after the ban expires. Each player is checked on connect, if they are a BOT they are ignored. Now times this over 4 or more servers and happy days!Compatibility:This should work with any game.Requirements:These are out of scope for the install of this plugin, but must be performed for it to work...1. A working MySQL Database2. A correctly set up 'default' connection to the db in '/addons/sourcemod/configs/databases.cfg' (see here for more info http://wiki.alliedmo....#Configuration)Commands:These commands can be used via the clients console while in game:my_ban <#userid|name> [reason]my_unban How to Install:1. The plugin will create the table automatically, if it does not, download the SQL file attached and run on your database (this creates the database table & fields for you to use)2. Put the mysql_bans.smx file in your plugins directory2. Put the mysql_bans.smx file in your plugins directory Code: CREATE TABLE IF NOT EXISTS `my_bans` ( `id` int(11) NOT NULL auto_increment, `steam_id` varchar(32) NOT NULL, `player_name` varchar(65) NOT NULL, `ban_length` int(1) NOT NULL default '0', `ban_reason` varchar(100) NOT NULL, `banned_by` varchar(100) NOT NULL, `timestamp` timestamp NOT NULL default '0000-00-00 00:00:00' on update CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `steam_id` (`steam_id`)) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1; Attached Files Dołączona grafika Get Plugin or Get Source (mysqlt_bans.sp - 5.5 KB)

Wyświetl pełny artykuł




Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych