Why don'y you use it:
Code:
private static void cmd_sit()
{
TargetRoomUser = Session.GetHabbo().CurrentRoom.GetRoomUserByHabbo(Session.GetHabbo().Username);
if (!TargetRoomUser.Statusses.ContainsKey("sit") && (TargetRoomUser.RotBody % 2) == 0)
{
// Checks body position (ensures it is not diagonal).
// @notes:
// - Do not check head position as it swivels when Habbos talk in the room.
// Sets seated status.
TargetRoomUser.Statusses.Add("sit", "1.0");
// Puts them on the ground level of the room. Comment out to have them 1 space above the ground.
TargetRoomUser.Z = -0.5;
// Updates Habbo.
BaalEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId).UpdateUserStatus(TargetRoomUser, true);
Session.SendNotif("You are now seated.");
else
{
Session.SendNotif("You cannot be seated diagonally or you are sit yet.");
}
}
}
Because you if the user isn't diagonally you update the vars of his body, rot, and more, but, if the user is sit, you update it too, it spend time, now, it's check if the user is sit, or diagonally and update it or not.
I think it's better, but your code isn't bad.
THX!