Resource:Sqlbans: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{Resource page}} __NOTOC__ The SQLbans resource gives servers 100% flexibility with their ban system because they can edit it to meet their needs. The bans are stored in SQL rat...") |
No edit summary |
||
Line 1: | Line 1: | ||
{{Resource page}} | {{Resource page}} | ||
__NOTOC__ | __NOTOC__ | ||
The SQLbans resource gives servers 100% flexibility with their ban system | The SQLbans resource gives servers 100% flexibility with their ban system as it can be edited to meet their needs. The bans are stored using the inbult SQL functions into the database "bans" rather than XML which is used by the inbuilt MTA ban system. | ||
Download can be found: [http://community.mtasa.com/index.php?p=resources&s=details&id=1670 On the MTA community]. | Download can be found: [http://community.mtasa.com/index.php?p=resources&s=details&id=1670 On the MTA community]. |
Revision as of 17:02, 1 February 2011
The SQLbans resource gives servers 100% flexibility with their ban system as it can be edited to meet their needs. The bans are stored using the inbult SQL functions into the database "bans" rather than XML which is used by the inbuilt MTA ban system.
Download can be found: On the MTA community.
Exported functions/events
Click to collapse [-]
ServerFunctions
bool addBanSQL ( string banValue, string/element banisher, string reason, int duration )
- banValue: A string for a players serial or IP address.
- banisher: Either a string, player pointer, or element pointer.
- reason: The reason for the ban.
- duration: Integer in minutes for the ban.
table getBansSQL ()
Returns a table with 4 columns:
- banValue: A string for a players serial or IP address.
- banisher: Either a string, player pointer, or element pointer.
- reason: The reason for the ban.
- duration: Integer in minutes for the ban.
string banValue string banisher string reason int duration getBanDetailsSQL ( string banValue )
Returns three strings and an integer:
- banValue: A string for a players serial or IP address.
- banisher: Either a string, player pointer, or element pointer.
- reason: The reason for the ban.
- duration: Integer in minutes for the ban.
bool banPlayerSQL ( player thePlayer, bool serial, bool ipAddress, string/player/resource banisher, string reason, int duration )
- thePlayer: The player to ban
- serial: Ban their serial?
- ipAddress: Ban their IP address? (Can't ban both)
- banisher: A string, player, or resource that is banning the player
- reason: The ban reason
- duration: Time in minutes the ban should last for
bool removeBanSQL ( string banValue, string/player/resource unbanisher )
- banValue: An IP address or serial to unban
- serial: A string, player or resource that is causing the unban.