If your able to code staff reset and job reset, will you be able to share it with me?Thats awesome; Also CCTV , & I'm gonna work on a command that allows you to basically transform into a Super Habbo. Your entire clothing will change and you'll have added Health & Body armor and the higher you level, the hire Health, Energy, Strength, and Armor you will have. Also, I added Staff Reset which will clear all staff, Gang Reset, Job Reset which will globally fire employees, & Master Reset , which will basically give your RP a fresh start.
#region :Reset Staff
case "reset_staff":
case "remove_staff":
//This will check if your a RP Admin which allows you to use this command
if (!Session.HasRight("hotel_admin"))
return false;
//This is what you will Say(Shout) After using the command successfully
instanceByRoomId.BroadcastMessage(RoomChatComposer.Compose(Actor.Id, "*[ALERT]Makes a anonymous executive call, removing all Staff & Badges*", 0, ChatType.Shout), false);
{
{
using (SqlDatabaseClient MySqlClient = SqlDatabaseManager.GetClient())
{
//This checks again, if your a RP admin
if (!Session.HasRight("hotel_admin"))
return false;
//This will make all user ranks 1.
MySqlClient.ExecuteNonQuery("UPDATE users SET rank = '1'");
// This will remove staff badges. Which enables staff. (Soon Will update to only remove @Where Badge 11 (Staff Badge)
MySqlClient.ExecuteNonQuery("DELETE FROM `badges` WHERE `source_data` = 'ADM'");
return true;
}
}
}
#endregion
//CREST-HAWK Added///
#region :Reset Jobs
case "reset_jobs":
case "killjobs":
//Admin Check
if (!Session.HasRight("hotel_admin"))
return false;
//This is what you will say after executing the command
instanceByRoomId.BroadcastMessage(RoomChatComposer.Compose(Actor.Id, "*[ALERT]Makes a anonymous executive call, firing all RP employees from all Jobs*", 0, ChatType.Shout), false);
{
//This will make all users become unemployed, including CEO's, Managers, and YOU.
{
using (SqlDatabaseClient MySqlClient = SqlDatabaseManager.GetClient())
{
//Admin Check
if (!Session.HasRight("hotel_admin"))
return false;
//This will set everyones Job ID to 2 = State (Unemployment)
MySqlClient.ExecuteNonQuery("UPDATE users SET groupid = '2'");
//This will set everyones Job Rank to 1
MySqlClient.ExecuteNonQuery("UPDATE users SET jobrank = '1'");
//This will remove group members (Job Members) Just Incase
MySqlClient.ExecuteNonQuery("TRUNCATE TABLE `groups_memberships`");
//Done!
return true;
}
}
}
#endregion
I prefer using this instead of "MySqlClient.ExecuteNonQuery("TRUNCATE TABLE `badges`");"
Code:MySqlClient.ExecuteNonQuery("DELETE FROM `badges` WHERE `source_data` = 'ADM'");