Guest User

Untitled

a guest
Apr 21st, 2017
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.39 KB | None | 0 0
  1. --English Version :D
  2. gun = {
  3. tab = {},
  4. window = {},
  5. tabpanel = {},
  6. button = {}
  7. }
  8.  
  9. local player = localPlayer
  10.  
  11. function shopInterface()
  12. gun.window[1] = guiCreateWindow(339, 202, 622, 328, "Ghostland DayZ shop", false)
  13. guiWindowSetMovable(gun.window[1], true)
  14. guiSetVisible(gun.window[1], false)
  15. guiWindowSetSizable(gun.window[1], false)
  16. guiSetProperty(gun.window[1], "CaptionColour", "FFFF0000")
  17.  
  18. gun.tabpanel[1] = guiCreateTabPanel(52, 45, 518, 220, false, gun.window[1])
  19.  
  20. gun.tab[1] = guiCreateTab("Arme", gun.tabpanel[1])
  21.  
  22. gun.button[1] = guiCreateButton(17, 10, 152, 69, "", false, gun.tab[1])
  23. guiSetProperty(gun.button[1], "NormalTextColour", "FFAAAAAA")--giveWeapon (thePlayer, weaponID, ammo)
  24. gun.button[2] = guiCreateButton(17, 10, 152, 69, "M4 + 30 Mag/ 500$", false, gun.tab[1])
  25. guiSetFont(gun.button[2], "default-bold-small")
  26. guiSetProperty(gun.button[2], "NormalTextColour", "FF00FF00")
  27. gun.button[3] = guiCreateButton(183, 10, 152, 69, "AK-47 + 30 Mag/ 500$", false, gun.tab[1])
  28. guiSetFont(gun.button[3], "default-bold-small")
  29. guiSetProperty(gun.button[3], "NormalTextColour", "FF00FF00")
  30. gun.button[4] = guiCreateButton(350, 10, 152, 69, "CZ 550 / 500GL", false, gun.tab[1])
  31. guiSetFont(gun.button[4], "default-bold-small")
  32. guiSetProperty(gun.button[4], "NormalTextColour", "FF00FF00")
  33. gun.button[5] = guiCreateButton(17, 104, 152, 69, "Desert Eagle + 30 Mag/ 300$", false, gun.tab[1])
  34. guiSetFont(gun.button[5], "default-bold-small")
  35. guiSetProperty(gun.button[5], "NormalTextColour", "FF00FF00")
  36. gun.button[6] = guiCreateButton(183, 104, 152, 69, "Hatchet / 200GL", false, gun.tab[1])
  37. guiSetFont(gun.button[6], "default-bold-small")
  38. guiSetProperty(gun.button[6], "NormalTextColour", "FF00FF00")
  39. gun.button[7] = guiCreateButton(350, 104, 152, 69, "Toolbox + Map + GPS/ 200GL", false, gun.tab[1])
  40. guiSetFont(gun.button[7], "default-bold-small")
  41. guiSetProperty(gun.button[7], "NormalTextColour", "FF00FF00")
  42.  
  43. gun.tab[2] = guiCreateTab("Mag", gun.tabpanel[1])
  44.  
  45. gun.button[8] = guiCreateButton(12, 7, 126, 179, "M4 Mag x 50/ 300$", false, gun.tab[2])
  46. guiSetFont(gun.button[8], "default-bold-small")
  47. guiSetProperty(gun.button[8], "NormalTextColour", "FF00FF00")
  48. gun.button[9] = guiCreateButton(382, 7, 126, 179, "AK-47 Mag x 50/ 300$", false, gun.tab[2])
  49. guiSetFont(gun.button[9], "default-bold-small")
  50. guiSetProperty(gun.button[9], "NormalTextColour", "FF00FF00")
  51. gun.button[10] = guiCreateButton(150, 6, 216, 82, "CZ 550 Mag x 50/ 300$", false, gun.tab[2])
  52. guiSetFont(gun.button[10], "default-bold-small")
  53. guiSetProperty(gun.button[10], "NormalTextColour", "FF00FF00")
  54. gun.button[11] = guiCreateButton(153, 103, 213, 83, "Desert Eagle Mag x 50/ 150$", false, gun.tab[2])
  55. guiSetFont(gun.button[11], "default-bold-small")
  56. guiSetProperty(gun.button[11], "NormalTextColour", "FF00FF00")
  57.  
  58.  
  59. gun.button[12] = guiCreateButton(21, 275, 573, 36, "Close Shop!", false, gun.window[1])
  60. guiSetFont(gun.button[12], "default-bold-small")
  61. guiSetProperty(gun.button[12], "NormalTextColour", "FFFF0000")
  62. end
  63. addEventHandler("onClientResourceStart", resourceRoot, shopInterface)
  64.  
  65. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  66. function ( )
  67. if (source == gun.button[2]) then
  68. triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_m4")
  69. end
  70.  
  71. end
  72. )
  73.  
  74. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  75. function ( )
  76. if (source == gun.button[3]) then
  77. triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_ak")
  78. end
  79.  
  80. end
  81. )
  82.  
  83. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  84. function ( )
  85. if (source == gun.button[4]) then
  86. triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_cz")
  87. end
  88.  
  89. end
  90. )
  91.  
  92. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  93. function ( )
  94. if (source == gun.button[5]) then
  95. triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_bizon")
  96. end
  97.  
  98. end
  99. )
  100.  
  101. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  102. function ( )
  103. if (source == gun.button[6]) then
  104. triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_topor")
  105. end
  106.  
  107. end
  108. )
  109.  
  110. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  111. function ( )
  112. if (source == gun.button[7]) then
  113. triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_tool")
  114. end
  115.  
  116. end
  117. )
  118.  
  119. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  120. function ( )
  121. if (source == gun.button[8]) then
  122. triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_m4mag")
  123. end
  124.  
  125. end
  126. )
  127.  
  128. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  129. function ( )
  130. if (source == gun.button[9]) then
  131. triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_akmag")
  132. end
  133.  
  134. end
  135. )
  136.  
  137. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  138. function ( )
  139. if (source == gun.button[10]) then
  140. triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_czmag")
  141. end
  142.  
  143. end
  144. )
  145.  
  146. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  147. function ( )
  148. if (source == gun.button[11]) then
  149. triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_bizonmag")
  150. end
  151.  
  152. end
  153. )
  154.  
  155. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()),
  156. function ( )
  157. if (source == gun.button[12]) then
  158. guiSetVisible(gun.window[1], false)
  159. showCursor(false)
  160. end
  161.  
  162. end
  163. )
  164.  
  165. function Windows()
  166. guiSetVisible(gun.window[1], true)
  167. showCursor(true)
  168. end
  169. addEvent("openWindow1",true)
  170. addEventHandler("openWindow1", getRootElement(), Windows)
Advertisement
Add Comment
Please, Sign In to add comment