public void Handle(GameClient session, ClientMessage message) { RoomUnit user = session.GetHabbo().GetRoomSession().GetRoomUser(); if (!user.HasStatus("lay")) { if (user.BodyRotation == 0 || user.BodyRotation == 2 || user.BodyRotation == 4 || user.BodyRotation == 6) { user.AddStatus("sit", TextUtilies.DoubleWithDotDecimal((user.Z + 1) / 2 - user.Z * 0.5)); } } }
public override bool OnUse(GameClient session, string[] args) { RoomUnit user = session.GetHabbo().GetRoomSession().GetRoomUser(); if (user.HasStatus("sit") && !user.CurrentTile.IsSeat) { user.RemoveStatus("sit"); return(true); } else { if (!user.HasStatus("lay")) { if (user.BodyRotation == 0 || user.BodyRotation == 2 || user.BodyRotation == 4 || user.BodyRotation == 6) { user.AddStatus("sit", TextUtilies.DoubleWithDotDecimal((user.Z + 1) / 2 - user.Z * 0.5)); } } } return(true); }