ADDON UBEREMU : commands help in DB
Hello ragezone!
I make a code based on Message of the day in the db
Find, in Misc/ChatCommandHandler, this code
Replace the block by
Code:
case "help":
case "info":
case "details":
case "about":
string help_message; // About in the DB
string link_help; // Link of the message helpm
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
link_help = dbClient.ReadString("SELECT value FROM config WHERE variable_name = 'link_help' LIMIT 1");
help_message = dbClient.ReadString("SELECT value FROM config WHERE variable_name = 'help_message' LIMIT 1");
}
Session.SendNotif(help_message, link_help);
return true;
SQL :
Insert in the TABLE `Config`
'help_message' : your help message : ex : Creator is the creator for UberHotel (c) 2010 - 2011, thanks you for Meth0d, creator for UberEmu
'link_help' : your link : ex : http://your-site.com/help
Re: ADDON UBEREMU : commands help in DB
Re: ADDON UBEREMU : commands help in DB