Advertisement
Guest User

Untitled

a guest
Oct 18th, 2019
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.03 KB | None | 0 0
  1. --// \\
  2. --|| Project: MTA - German LSR Reallife Gamemode ||
  3. --|| Developers: Lorenzo ||
  4. --|| Version: 3.6 ||
  5. --|| URL: Reallife-SA.de ||
  6. --\\ //
  7.  
  8. local HouseN_GUI={Window={},Button={},Gridlist={},GridlistColumn={},Label={},Edit={},Image={},Tabpanel={},Tab={},}
  9. loadstring(exports.dgs:dgsImportFunction())()-- load functions
  10.  
  11. function openHouseOwnerGUI()
  12. if not isPedInVehicle(lp)then
  13. if getElementData(lp,"ElementClicked")==false then
  14. showCursor(true)
  15. setElementData(lp,"ElementClicked",true)
  16. HouseN_GUI.Window[1]=dgsCreateWindow(0,GLOBALscreenY/2-250/2,300,250,"Hausmenü",false,tocolor(255,255,255),nil,nil,nil,nil,nil,true)
  17. dgsMoveTo(HouseN_GUI.Window[1],GLOBALscreenX/2-300/2,GLOBALscreenY/2-250/2,false,false,"OutQuad",1500)
  18. dgsWindowSetSizable(HouseN_GUI.Window[1],false)
  19. dgsWindowSetMovable(HouseN_GUI.Window[1],false)
  20. HouseN_GUI.Button[1]=dgsCreateButton(274,-25,26,25,"×",false,HouseN_GUI.Window[1],_,_,_,_,_,_,tocolor(200,50,50,255),tocolor(250,20,20,255),tocolor(150,50,50,255),true)
  21.  
  22. local house=getElementData(lp,"house")
  23. --preis=getElementData(house,"preis")
  24. rent=getElementData(house,"miete")
  25.  
  26. HouseN_GUI.Label[1]=dgsCreateLabel(10,10,200,40,"Preis: ",false,HouseN_GUI.Window[1])
  27. HouseN_GUI.Label[2]=dgsCreateLabel(10,25,200,40,"Mindestspielzeit: 3 Stunden",false,HouseN_GUI.Window[1])
  28.  
  29. HouseN_GUI.Button[2]=dgsCreateButton(10,140,280,30,"Bezahlen [Bar]",false,HouseN_GUI.Window[1],_,_,_,_,_,_,tocolor(50,50,50,255),tocolor(90,90,90,255),tocolor(10,10,10,255),true)
  30. HouseN_GUI.Button[3]=dgsCreateButton(10,180,280,30,"Bezahlen [Bank]",false,HouseN_GUI.Window[1],_,_,_,_,_,_,tocolor(50,50,50,255),tocolor(90,90,90,255),tocolor(10,10,10,255),true)
  31.  
  32. --dgsSetText(HouseN_GUI.Label[1],"Preis: "..preis..""..waehrung.."")
  33.  
  34.  
  35.  
  36.  
  37. addEventHandler("onDgsMouseClick",HouseN_GUI.Button[3],
  38. function(btn,state)
  39. if btn=="left" and state=="up" then
  40. dgsCloseWindow(HouseN_GUI.Window[1])
  41. showCursor(false)
  42. setElementData(lp,"ElementClicked",false)
  43. triggerServerEvent("onHouseBuyGUI",lp,lp,"bank")
  44. end
  45. end,
  46. false)
  47. addEventHandler("onDgsMouseClick",HouseN_GUI.Button[2],
  48. function(btn,state)
  49. if btn=="left" and state=="up" then
  50. dgsCloseWindow(HouseN_GUI.Window[1])
  51. showCursor(false)
  52. setElementData(lp,"ElementClicked",false)
  53. triggerServerEvent("onHouseBuyGUI",lp,lp,"bar")
  54. end
  55. end,
  56. false)
  57.  
  58. addEventHandler("onDgsMouseClick",HouseN_GUI.Button[1],
  59. function(btn,state)
  60. if btn=="left" and state=="up" then
  61. dgsCloseWindow(HouseN_GUI.Window[1])
  62. showCursor(false)
  63. setElementData(lp,"ElementClicked",false)
  64. end
  65. end,
  66. false)
  67.  
  68. end
  69. end
  70. end
  71. addEvent("onCreateNewHouseGUI",true)
  72. addEventHandler("onCreateNewHouseGUI",lp,openHouseOwnerGUI)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement