Guest User

Untitled

a guest
Apr 22nd, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.81 KB | None | 0 0
  1. --English Version :D
  2. item = {
  3. tab = {},
  4. window = {},
  5. tabpanel = {},
  6. button = {}
  7. }
  8.  
  9. function shopInterface()
  10. item.window[1] = guiCreateWindow(344, 212, 627, 334, "DayZ Shop - by mihayy5", false)
  11. guiWindowSetMovable(item.window[1], true)
  12. guiSetVisible(item.window[1], false)
  13. guiWindowSetSizable(item.window[1], false)
  14. guiSetProperty(item.window[1], "CaptionColour", "FFFF0000")
  15.  
  16. item.tabpanel[1] = guiCreateTabPanel(26, 37, 576, 228, false, item.window[1])
  17.  
  18. item.tab[1] = guiCreateTab("Iteme", item.tabpanel[1])
  19.  
  20. item.button[1] = guiCreateButton(18, 13, 226, 77, "Pizza x 4/ 200 $", false, item.tab[1])
  21. guiSetFont(item.button[1], "default-bold-small")
  22. guiSetProperty(item.button[1], "NormalTextColour", "FF00FF00")
  23. item.button[2] = guiCreateButton(317, 13, 226, 77, "Water Bottle x 4/ 100 $", false, item.tab[1])
  24. guiSetFont(item.button[2], "default-bold-small")
  25. guiSetProperty(item.button[2], "NormalTextColour", "FF00FF00")
  26. item.button[3] = guiCreateButton(18, 108, 226, 77, "Coyote Backpack / 1000$", false, item.tab[1])
  27. guiSetFont(item.button[3], "default-bold-small")
  28. guiSetProperty(item.button[3], "NormalTextColour", "FF00FF00")
  29. item.button[4] = guiCreateButton(317, 108, 226, 77, "Camuflaj Clothing/ 300$", false, item.tab[1])
  30. guiSetFont(item.button[4], "default-bold-small")
  31. guiSetProperty(item.button[4], "NormalTextColour", "FF00FF00")
  32.  
  33. item.tab[2] = guiCreateTab("Vehicul", item.tabpanel[1])
  34.  
  35. item.button[5] = guiCreateButton(12, 15, 178, 173, "Engine /1000 $", false, item.tab[2])
  36. guiSetFont(item.button[5], "default-bold-small")
  37. guiSetProperty(item.button[5], "NormalTextColour", "FF00FF00")
  38. item.button[6] = guiCreateButton(388, 15, 178, 173, "Full Gas Canister / 500$", false, item.tab[2])
  39. guiSetFont(item.button[6], "default-bold-small")
  40. guiSetProperty(item.button[6], "NormalTextColour", "FF00FF00")
  41. item.button[7] = guiCreateButton(200, 15, 178, 173, "TKP + Tire / 1000$", false, item.tab[2])
  42. guiSetFont(item.button[7], "default-bold-small")
  43. guiSetProperty(item.button[7], "NormalTextColour", "FF00FF00")
  44.  
  45.  
  46. item.button[8] = guiCreateButton(17, 277, 595, 47, "Close Shop!", false, item.window[1])
  47. guiSetFont(item.button[8], "default-bold-small")
  48. guiSetProperty(item.button[8], "NormalTextColour", "FFFF0000")
  49. end
  50. addEventHandler("onClientResourceStart", resourceRoot, shopInterface)
  51.  
  52. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  53. function ( )
  54. if (source == item.button[1]) then
  55. triggerServerEvent("onClientBuyItem", localPlayer, "item_pizza")
  56. end
  57.  
  58. end
  59. )
  60. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  61. function ( )
  62. if (source == item.button[2]) then
  63. triggerServerEvent("onClientBuyItem", localPlayer, "item_apa")
  64. end
  65.  
  66. end
  67. )
  68. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  69. function ( )
  70. if (source == item.button[3]) then
  71. triggerServerEvent("onClientBuyItem", localPlayer, "item_coy")
  72. end
  73.  
  74. end
  75. )
  76. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  77. function ( )
  78. if (source == item.button[4]) then
  79. triggerServerEvent("onClientBuyItem", localPlayer, "item_haina")
  80. end
  81.  
  82. end
  83. )
  84. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  85. function ( )
  86. if (source == item.button[5]) then
  87. triggerServerEvent("onClientBuyItem", localPlayer, "item_motor")
  88. end
  89.  
  90. end
  91. )
  92. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  93. function ( )
  94. if (source == item.button[6]) then
  95. triggerServerEvent("onClientBuyItem", localPlayer, "item_gas")
  96. end
  97.  
  98. end
  99. )
  100. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  101. function ( )
  102. if (source == item.button[7]) then
  103. triggerServerEvent("onClientBuyItem", localPlayer, "item_tkp")
  104. end
  105.  
  106. end
  107. )
  108.  
  109. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  110. function ( )
  111. if (source == item.button[8]) then
  112. guiSetVisible(item.window[1],false)
  113. showCursor(false)
  114. end
  115.  
  116. end
  117. )
  118.  
  119. function Windows2()
  120. guiSetVisible(item.window[1],true)
  121. showCursor(true)
  122. end
  123. addEvent("openWindow2",true)
  124. addEventHandler("openWindow2", getRootElement(), Windows2)
Add Comment
Please, Sign In to add comment