:manutenzione
• :manutenzione/togli manutenzione
• manutenzione=puts on maniteance the hotel/togli manutenzione=puts on the hotel
Here you go. Coded by me so may not be up to best standards.
Code:
case "maintenance":
if (Session.GetHabbo().HasFuse("fuse_admin"))
{
if (Params[1] == "on")
{
{
string Notice = Input.Substring(3);
ServerMessage HotelAlert = new ServerMessage(139);
HotelAlert.AppendStringWithBreak("Message from management:\n SuperRP will is going offline for the night momentarily, We hope to see you back in the hotel soon.");
UberEnvironment.GetGame().GetClientManager().BroadcastMessage(HotelAlert);
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
dbClient.ExecuteQuery("UPDATE site_config SET maintenance = '1'");
return true;
}
}
if (Params[1] == "off")
{
if (Session.GetHabbo().HasFuse("fuse_admin"))
{
string Notice = Input.Substring(3);
ServerMessage HotelAlert = new ServerMessage(139);
HotelAlert.AppendStringWithBreak("Message from management:\n SuperRP will is back online, We hope to see you having fun :D");
UberEnvironment.GetGame().GetClientManager().BroadcastMessage(HotelAlert);
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
dbClient.ExecuteQuery("UPDATE site_config SET maintenance = '0'");
return true;
}
else
{
Session.SendNotif(Params[1] + " is not a valid code for the command\"maintenance\" !");
}
}
}
else
{
Session.SendNotif("Error! Your not the right rank to do this!");
}
return false;
P.S: code is ":maintenance on" or ":maintenance off"