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

[ASA]: Advanced SQL Advertisements


  • 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 488
  • Lokalizacja:AMXX.PL
Offline

Napisano 01.03.2014 14:36

Advanced SQL Advertisements

Description:
I search in forums for something like this but nothing found. So i decided to make one! :P
With this plugin you can add some advertisements(dhud/chat/hud) into SQL and then to show them in-game. It's a simple plugin which will make your life easier for communities. It's a better way not to write the same things in .ini files.

Admin Commands:
PHP Code:

-asa_add_adv "type: chat/hud/dhud" "message" "red" "green" "blue"
It adds an advertisement in SQL
NOTE1
: If the type is chat there is no need to add redgreen,blue
NOTE2RedGreenBlue is values 0-255.
NOTE3
You can use colorchat: !for green color, !for team color and !for yellow color.

-
asa_del_adv "type: chat/hud/dhud" "message"
Deletes the advertisement from SQL with this type name.

-
asa_show_advs
Shows all advertisements in console

-asa_reload_advs
Reloads all advertisements

-say /advs
Opens a menu with all advertisements 

Cvars:
No CVARS Needed.

Plugin Customization:
PHP Code:

#define MAX_CHAT_MESSAGES 20 //Max chat messages in sql
#define MAX_HUD_MESSAGES 20 //Max hud messages in sql
#define MAX_DHUD_MESSAGES 20 //Max dhud messages in sql

#define ADMIN_FLAG ADMIN_BAN //Admin flag for commands

#define USE_PREFIX //define this if u don't want chat prefix

//MYSQL Database Attributes
new Host[]        = ""
new User[]        = ""
new Pass[]        = ""
new DB[]           = ""
new Table[]     = "asa_messages"

new const Float:MIN_TIME_CHAT 60.0 //Min time to display chat messages
new const Float:MAX_TIME_CHAT 80.0 //Max time to display chat messages
new const Float:MIN_TIME_HUD 120.0 //Min time to display hud messages
new const Float:MAX_TIME_HUD 160.0 //Max time to display hud messages

#if defined USE_PREFIX
new const saychatprefix[] = { "!g[!nAdvanced SQL Advs!g]!n" }
#endif 

Changelog:
  • 1.0 - Release

TO DO:
  • Add PHP Script for control advertisements via website(NOT DONE!)
  • Make the advertisements to be controllable via menu(NOT DONE!)

Installation:
Just add mysql, compile and add to plugins.ini.
No need any module or something like this.
Wyświetl pełny artykuł




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

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