Modular Advertisements
Description:Yes, another advertisements plugin, yippy. It is pretty much a copy pasterino witth some changes that offer some interesting oppurtunities for plugin developers. Several server have issues where their chat is spammed with different advertisements from different plugins. This update fixes that issue.
Control Variables:- sm_advertisements_enabled (default: 1) Enable/Disable the plugin
- sm_advertisements_file (default: advertisements.txt) Advertisements configuration file
- sm_advertisements_interval (default: 30) Advertisements interval
Natives:
Code:
/**
* Register an advertisement
*
* @param strType Type of advertisement
* @param strText Text to display
* @param strFlags Required admin flag(s) to view the advertisement
* @noreturn
*/
native RegisterAdvertisement(String:strType[], String:strText[], String:strFlags[] = "none");
// Example
RegisterAdvertisement("S", "{olive}Type !forum to visit our website!");
Forwards:
Code:
/**
* Called when the advertisement configuration file is loaded
*
* @noreturn
*/
forward OnAdvertisementsLoaded(client);
Configuration: (default: advertisements.txt)
Code:
"Advertisements"
{
"1"
{
"type" "S"
"text" "{GREEN}[email protected]"
}
"2"
{
"type" "T"
"text" "www.domain.com"
"flags" "a"
}
}
Version Log:Installation:
1) Add the files included in this post to their folders relative to sourcemod/addons
- advertisements.smx to plugins
- advertisements.txt to configs
My Plugins
intox Gaming