Advertisement
Guest User

Untitled

a guest
Dec 20th, 2015
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.96 KB | None | 0 0
  1. case "sit":
  2. TargetRoomUser = Session.GetHabbo().CurrentRoom.GetRoomUserByHabbo(Session.GetHabbo().Username);
  3.  
  4. if (TargetRoomUser.Statusses.ContainsKey("sit") == false)
  5. {
  6. // Checks body position (ensures it is not diagonal).
  7. // @notes:
  8. // - Do not check head position as it swivels when Habbos talk in the room.
  9. if ((TargetRoomUser.RotBody % 2) == 0)
  10. {
  11. // Sets seated status.
  12. TargetRoomUser.Statusses.Add("sit", "1.0");
  13.  
  14. // Puts them on the ground level of the room. Comment out to have them 1 space above the ground.
  15. TargetRoomUser.Z = -0.5;
  16. }
  17.  
  18. // Sends update to Habbo in-game.
  19. if (TargetRoomUser.Statusses.ContainsKey("sit") == true)
  20. {
  21. // Updates Habbo.
  22. BaalEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId).UpdateUserStatus(TargetRoomUser, true);
  23.  
  24. Session.SendNotif("You are now seated.");
  25. }
  26. else
  27. {
  28. Session.SendNotif("You cannot be seated diagonally.");
  29. }
  30. }
  31. else
  32. {
  33. Session.SendNotif("You are already seated! Relax.");
  34. }
  35.  
  36.  
  37.  
  38.  
  39.  
  40. ---------------------------------------------------------
  41. error:
  42. No overload for method 'UpdateUserStatus' takes 2 arguments
  43.  
  44. The error says the problem right there. So add to your method 'UpdateUserStatus' this:
  45.  
  46. Code:
  47. something UpdateUserStatus(var var, bool Force = false)
  48. Then add this to the method itself:
  49.  
  50. (make sure to change the 'updatestatus' to the variable you use.
  51.  
  52. Code:
  53. if (Force == true)
  54. {
  55. updatestatus = true;
  56. }
  57. else
  58. {
  59. ... (everything else in the original method)
  60. }
  61. Then it should work fine.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement