oxygen935
03-01-2014, 08: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.
UPDATE 1.2: Now u can handle the Advertisements by servers
Admin Commands:
-asa_add_adv "type: chat/hud/dhud" "message" "servers with commas|all" "red" "green" "blue"
It adds an advertisement in SQL
NOTE1: If the type is chat there is no need to add red, green,blue.
NOTE2: Red, Green, Blue is values 0-255.
NOTE3: You can use colorchat: !g for green color, !t for team color and !n for yellow color.
Examples:
asa_add_adv "chat" "kappa" "127.0.0.1:27015"
asa_add_adv "hud" "kappakeppo" "127.0.0.1:27015,127.0.0.1:27016" "255" "0" "0"
asa_add_adv "dhud" "kappakeppos" "all" "255" "255" "0"
-asa_del_adv "type: chat/hud/dhud" "message" "servers with commas|all"
Deletes the advertisement from SQL with this type & name.
NOTE: Same way to add server with the above
-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:
#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 MAX_SERVERS 20 //Max Servers in sql
#define ADMIN_FLAG ADMIN_BAN //Admin flag for commands
#define USE_PREFIX //define this if u don't want chat prefix
new Host[] = ""
new User[] = ""
new Pass[] = ""
new DB[] = ""
new const Float:MIN_TIME_CHAT = 60.0
new const Float:MAX_TIME_CHAT = 80.0
new const Float:MIN_TIME_HUD = 120.0
new const Float:MAX_TIME_HUD = 160.0
#if defined USE_PREFIX
new const saychatprefix[] = { "!g[!nAdvanced SQL Advs!g]!n" }
#endif
Changelog:
1.0 - Release
1.2 - Control Servers' Advertisements, make Advertisements only for some servers
TO DO:
Add VB|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.
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.
UPDATE 1.2: Now u can handle the Advertisements by servers
Admin Commands:
-asa_add_adv "type: chat/hud/dhud" "message" "servers with commas|all" "red" "green" "blue"
It adds an advertisement in SQL
NOTE1: If the type is chat there is no need to add red, green,blue.
NOTE2: Red, Green, Blue is values 0-255.
NOTE3: You can use colorchat: !g for green color, !t for team color and !n for yellow color.
Examples:
asa_add_adv "chat" "kappa" "127.0.0.1:27015"
asa_add_adv "hud" "kappakeppo" "127.0.0.1:27015,127.0.0.1:27016" "255" "0" "0"
asa_add_adv "dhud" "kappakeppos" "all" "255" "255" "0"
-asa_del_adv "type: chat/hud/dhud" "message" "servers with commas|all"
Deletes the advertisement from SQL with this type & name.
NOTE: Same way to add server with the above
-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:
#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 MAX_SERVERS 20 //Max Servers in sql
#define ADMIN_FLAG ADMIN_BAN //Admin flag for commands
#define USE_PREFIX //define this if u don't want chat prefix
new Host[] = ""
new User[] = ""
new Pass[] = ""
new DB[] = ""
new const Float:MIN_TIME_CHAT = 60.0
new const Float:MAX_TIME_CHAT = 80.0
new const Float:MIN_TIME_HUD = 120.0
new const Float:MAX_TIME_HUD = 160.0
#if defined USE_PREFIX
new const saychatprefix[] = { "!g[!nAdvanced SQL Advs!g]!n" }
#endif
Changelog:
1.0 - Release
1.2 - Control Servers' Advertisements, make Advertisements only for some servers
TO DO:
Add VB|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.