Advertisement
Guest User

Untitled

a guest
Aug 5th, 2012
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 24.03 KB | None | 0 0
  1. button1 = guiCreateButton( 0.01, 0.01, 0.2, 0.1, price_colt,"Colt", false, tab1 )
  2. button2 = guiCreateButton( 0.01, 0.12, 0.2, 0.1, price_silencer, "Silencer", false, tab1 )
  3. button3 = guiCreateButton( 0.01, 0.23, 0.2, 0.1, price_deagle,"Deagle", false, tab1 )
  4. button4 = guiCreateButton( 0.01, 0.34, 0.2, 0.1, price_sawn,"Sawn off", false, tab1 )
  5. button5 = guiCreateButton( 0.01, 0.45, 0.2, 0.1, price_shotgun,"Shotgun", false, tab1 )
  6. button6 = guiCreateButton( 0.01, 0.56, 0.2, 0.1, price_spaz12,"Spaz 12", false, tab1 )
  7. button7 = guiCreateButton( 0.01, 0.67, 0.2, 0.1, price_mp5,"MP5", false, tab1 )
  8. button8 = guiCreateButton( 0.01, 0.78, 0.2, 0.1, price_tec9,"Tec 9", false, tab1 )
  9. button9 = guiCreateButton( 0.25, 0.01, 0.2, 0.1, price_uzi,"Uzi", false, tab1 )
  10. button10 = guiCreateButton( 0.25, 0.12, 0.2, 0.1, price_ak,"AK-47", false, tab1 )
  11. button11 = guiCreateButton( 0.25, 0.23, 0.2, 0.1, price_m4,"M4", false, tab1 )
  12. button12 = guiCreateButton( 0.25, 0.34, 0.2, 0.1, price_cs,"Country Sniper", false, tab1 )
  13. button13 = guiCreateButton( 0.25, 0.45, 0.2, 0.1, price_sniper,"Sniper", false, tab1 )
  14. button14 = guiCreateButton( 0.25, 0.56, 0.2, 0.1, price_ft,"Flame Thrower", false, tab1 )
  15. button15 = guiCreateButton( 0.25, 0.67, 0.2, 0.1, price_hsrpg,"HS RPG", false, tab1 )
  16. button16 = guiCreateButton( 0.25, 0.78, 0.2, 0.1, price_minigun,"Minigun", false, tab1 )
  17. button17 = guiCreateButton( 0.50, 0.01, 0.2, 0.1, price_rpg,"RPG", false, tab1 )
  18. button18 = guiCreateButton( 0.50, 0.12, 0.2, 0.1, price_grenade,"Grenade", false, tab1 )
  19. button19 = guiCreateButton( 0.50, 0.23, 0.2, 0.1, price_motolov,"Motolov", false, tab1 )
  20. button20 = guiCreateButton( 0.50, 0.34, 0.2, 0.1, price_satchel,"Satchel", false, tab1 )
  21. button21 = guiCreateButton( 0.50, 0.45, 0.2, 0.1, price_teargas,"Tear gas", false, tab1 )
  22. button22 = guiCreateButton( 0.50, 0.56, 0.2, 0.1, price_fire,"Fire Extinguiser", false, tab1 )
  23. button23 = guiCreateButton( 0.50, 0.67, 0.2, 0.1, price_parachute,"Parachute", false, tab1 )
  24. button24 = guiCreateButton( 0.50, 0.78, 0.2, 0.1, price_baseball,"Baseball bat", false, tab1 )
  25. button25 = guiCreateButton( 0.75, 0.01, 0.2, 0.1, price_cane,"Cane", false, tab1 )
  26. button26 = guiCreateButton( 0.75, 0.12, 0.2, 0.1, price_chainsaw,"Chainsaw", false, tab1 )
  27. button27 = guiCreateButton( 0.75, 0.23, 0.2, 0.1, price_golf,"Golf club", false, tab1 )
  28. button28 = guiCreateButton( 0.75, 0.34, 0.2, 0.1, price_pool,"Pool cue", false, tab1 )
  29. button29 = guiCreateButton( 0.75, 0.45, 0.2, 0.1, price_katana,"Katana", false, tab1 )
  30. button30 = guiCreateButton( 0.75, 0.56, 0.2, 0.1, price_knife,"Knife", false, tab1 )
  31. button31 = guiCreateButton( 0.75, 0.67, 0.2, 0.1, price_nightstick,"Nightstick", false, tab1 )
  32. button32 = guiCreateButton( 0.75, 0.78, 0.2, 0.1, price_shovel,"Shovel", false, tab1 )
  33.  
  34. function BuyWeapon(button, state)
  35.  
  36.     if (button == "left") then
  37.    
  38.         if(source == button1) then
  39.             triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_colt")
  40.         elseif(source == button2) then
  41.             triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_silencer") 
  42.         elseif(source == button3) then
  43.             triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_deagle")
  44.         elseif(source == button4) then
  45.             triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_sawn")
  46.         elseif(source == button5) then
  47.             triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_shotgun")
  48.         elseif(source == button6) then
  49.             triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_spaz12")
  50.         elseif(source == button7) then
  51.             triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_mp5")
  52.         elseif(source == button8) then
  53.             triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_tec9")
  54.         elseif(source == button9) then
  55.             triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_uzi")
  56.         elseif(source == button10) then
  57.             triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_ak")
  58.         elseif(source == button11) then
  59.             triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_m4")
  60.         elseif(source == button12) then
  61.             triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_cs")
  62.         elseif(source == button13) then
  63.             triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_sniper")
  64.         elseif(source == button14) then
  65.             triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_ft")
  66.         elseif(source == button15) then
  67.             triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_hsrpg")   
  68.         elseif(source == button16) then
  69.             triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_minigun")
  70.         elseif(source == button17) then
  71.             triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_rpg")
  72.         elseif(source == button18) then
  73.             triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_grenade")
  74.         elseif(source == button19) then
  75.             triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_motolov")
  76.         elseif(source == button20) then
  77.             triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_satchel")
  78.         elseif(source == button21) then
  79.             triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_teargas")
  80.         elseif(source == button22) then
  81.             triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_fire")
  82.         elseif(source == button23) then
  83.             triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_parachute")
  84.         elseif(source == button24) then
  85.             triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_baseball")
  86.         elseif(source == button25) then
  87.             triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_cane")
  88.         elseif(source == button26) then
  89.             triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_chainsaw") 
  90.         elseif(source == button27) then
  91.             triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_golf")
  92.         elseif(source == button28) then
  93.             triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_pool")
  94.         elseif(source == button29) then
  95.             triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_katana")
  96.         elseif(source == button30) then
  97.             triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_knife")   
  98.         elseif(source == button31) then
  99.             triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_nightstick")
  100.         elseif(source == button32) then
  101.             triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_shovel")
  102.         end
  103.    
  104.     end
  105. end
  106.  [/lua]
  107.  
  108.  
  109. server side:
  110. [lua] 
  111. function BuyWeaponOnServer(weapon_name)
  112.  
  113.     player_money      = getPlayerMoney(source)
  114.     player_account    = getPlayerAccount(source)
  115.  
  116. local price_colt = "150"
  117. local price_silencer = "200"
  118. local price_deagle = "350"
  119. local price_sawn = "500"
  120. local price_shotgun = "450"
  121. local price_spaz12 = "600"
  122. local price_mp5 = "500"
  123. local price_tec9 = "500"
  124. local price_uzi = "500"
  125. local price_ak = "700"
  126. local price_m4 = "800"
  127. local price_cs = "650"
  128. local price_sniper = "700"
  129. local price_ft = "1000"
  130. local price_hsrpg = "1000"
  131. local price_minigun = "5000"
  132. local price_rpg = "1000"
  133. local price_grenade = "500"
  134. local price_motolov = "500"
  135. local price_satchel = "600"
  136. local price_teargas = "500"
  137. local price_fire = "180"
  138. local price_parachute = "250"
  139. local price_baseball = "80"
  140. local price_cane = "80"
  141. local price_chainsaw = "120"
  142. local price_golf = "50"
  143. local price_pool = "50"
  144. local price_katana = "150"
  145. local price_knife = "90"
  146. local price_nightstick = "60"
  147. local price_shovel = "50"
  148.    
  149.         if(weapon_name == "weapon_colt") then
  150.             if(player_money >= tonumber(price_colt)) then
  151.                 giveWeapon(source, 22)
  152.                 takePlayerMoney(source, tonumber(price_colt))
  153.                 outputChatBox("You bought a colt.", source, 0, 255, 0)
  154.             else
  155.                 outputChatBox("You do not have enough money to buy a colt.", source, 255, 0, 0)
  156.             end
  157.  
  158.         elseif(weapon_name == "weapon_silencer") then
  159.             if(player_money >= tonumber(price_silencer)) then
  160.                 giveWeapon(source, 23, 1)
  161.                 takePlayerMoney(source, tonumber(price_silencer))
  162.                 outputChatBox("You bought an silencer.", source, 0, 255, 0)
  163.             else
  164.                 outputChatBox("You do not have enough money to buy an silencer", source, 255, 0, 0)
  165.             end
  166.        
  167.         elseif(weapon_name == "weapon_deagle") then
  168.             if(player_money >= tonumber(price_ak)) then
  169.                 giveWeapon(source, 24, 1)
  170.                 takePlayerMoney(source, tonumber(price_ak))
  171.                 outputChatBox("You bought an deagle.", source, 0, 255, 0)
  172.             else
  173.                 outputChatBox("You do not have enough money to buy an deagle.", source, 255, 0, 0)
  174.             end
  175.            
  176.         elseif(weapon_name == "weapon_sawn") then
  177.             if(player_money >= tonumber(price_sawn)) then
  178.                 giveWeapon(source, 26, 1)
  179.                 takePlayerMoney(source, tonumber(price_sawn))
  180.                 outputChatBox("You bought a sawn off.", source, 0, 255, 0)
  181.             else
  182.                 outputChatBox("You do not have enough money to buy a sawn off.", source, 255, 0, 0)
  183.             end
  184.            
  185.         elseif(weapon_name == "weapon_shotgun") then
  186.             if(player_money >= tonumber(price_shotgun)) then
  187.                 giveWeapon(source, 25, 1)
  188.                 takePlayerMoney(source, tonumber(price_shotgun))
  189.                 outputChatBox("You bought an shotgun.", source, 0, 255, 0)
  190.             else
  191.                 outputChatBox("You do not have enough money to buy an shotgun.", source, 255, 0, 0)
  192.             end
  193.            
  194.         elseif(weapon_name == "weapon_spaz12") then
  195.             if(player_money >= tonumber(price_spaz12)) then
  196.                 giveWeapon(source, 27, 1)
  197.                 takePlayerMoney(source, tonumber(price_spaz12))
  198.                 outputChatBox("You bought a spaz12.", source, 0, 255, 0)
  199.             else
  200.                 outputChatBox("You do not have enough money to buy a spaz12.", source, 255, 0, 0)
  201.             end
  202.            
  203.         elseif(weapon_name == "weapon_mp5") then
  204.             if(player_money >= tonumber(price_mp5)) then
  205.                 giveWeapon(source, 29, 1)
  206.                 takePlayerMoney(source, tonumber(price_mp5))
  207.                 outputChatBox("You bought an mp5.", source, 0, 255, 0)
  208.             else
  209.                 outputChatBox("You do not have enough money to buy an mp5.", source, 255, 0, 0)
  210.             end
  211.            
  212.         elseif(weapon_name == "weapon_tec9") then
  213.             if(player_money >= tonumber(price_tec9)) then
  214.                 giveWeapon(source, 32, 1)
  215.                 takePlayerMoney(source, tonumber(price_tec9))
  216.                 outputChatBox("You bought a tec9.", source, 0, 255, 0)
  217.             else
  218.                 outputChatBox("You do not have enough money to buy a tec9.", source, 255, 0, 0)
  219.             end
  220.            
  221.         elseif(weapon_name == "weapon_uzi") then
  222.             if(player_money >= tonumber(price_uzi)) then
  223.                 giveWeapon(source, 28, 1)
  224.                 takePlayerMoney(source, tonumber(price_uzi))
  225.                 outputChatBox("You bought a uzi.", source, 0, 255, 0)
  226.             else
  227.                 outputChatBox("You do not have enough money to buy a uzi.", source, 255, 0, 0)
  228.             end
  229.            
  230.         elseif(weapon_name == "weapon_ak") then
  231.             if(player_money >= tonumber(price_ak)) then
  232.                 giveWeapon(source, 30, 1)
  233.                 takePlayerMoney(source, tonumber(price_ak))
  234.                 outputChatBox("You bought a ak.", source, 0, 255, 0)
  235.             else
  236.                 outputChatBox("You do not have enough money to buy a ak.", source, 255, 0, 0)
  237.             end
  238.            
  239.         elseif(weapon_name == "weapon_m4") then
  240.             if(player_money >= tonumber(price_m4)) then
  241.                 giveWeapon(source, 31, 1)
  242.                 takePlayerMoney(source, tonumber(price_m4))
  243.                 outputChatBox("You bought a m4.", source, 0, 255, 0)
  244.             else
  245.                 outputChatBox("You do not have enough money to buy a m4.", source, 255, 0, 0)
  246.             end
  247.            
  248.         elseif(weapon_name == "weapon_cs") then
  249.             if(player_money >= tonumber(price_cs)) then
  250.                 giveWeapon(source, 33, 1)
  251.                 takePlayerMoney(source, tonumber(price_cs))
  252.                 outputChatBox("You bought a Country Rifle", source, 0, 255, 0)
  253.             else
  254.                 outputChatBox("You do not have enough money to buy a Country Rifle.", source, 255, 0, 0)
  255.             end
  256.            
  257.         elseif(weapon_name == "weapon_sniper") then
  258.             if(player_money >= tonumber(price_sniper)) then
  259.                 giveWeapon(source, 34, 1)
  260.                 takePlayerMoney(source, tonumber(price_sniper))
  261.                 outputChatBox("You bought a Sniper.", source, 0, 255, 0)
  262.             else
  263.                 outputChatBox("You do not have enough money to buy a Sniper.", source, 255, 0, 0)
  264.             end
  265.            
  266.         elseif(weapon_name == "weapon_hsrpg") then
  267.             if(player_money >= tonumber(price_hsrpg)) then
  268.                 giveWeapon(source, 36, 1)
  269.                 takePlayerMoney(source, tonumber(price_hsrpg))
  270.                 outputChatBox("You bought a Heat-Seak RPG.", source, 0, 255, 0)
  271.             else
  272.                 outputChatBox("You do not have enough money to buy a Heat-Seak RPG.", source, 255, 0, 0)
  273.             end
  274.            
  275.         elseif(weapon_name == "weapon_ft") then
  276.             if(player_money >= tonumber(price_ft)) then
  277.                 giveWeapon(source, 37, 1)
  278.                 takePlayerMoney(source, tonumber(price_ft))
  279.                 outputChatBox("You bought a flame thrower.", source, 0, 255, 0)
  280.             else
  281.                 outputChatBox("You do not have enough money to buy a flame thrower.", source, 255, 0, 0)
  282.             end
  283.        
  284.         elseif(weapon_name == "weapon_minigun") then
  285.             if(player_money >= tonumber(price_minigun)) then
  286.                 giveWeapon(source, 38, 1)
  287.                 takePlayerMoney(source, tonumber(price_minigun))
  288.                 outputChatBox("You bought a minigun.", source, 0, 255, 0)
  289.             else
  290.                 outputChatBox("You do not have enough money to buy a minigun.", source, 255, 0, 0)
  291.             end
  292.        
  293.         elseif(weapon_name == "weapon_rpg") then
  294.             if(player_money >= tonumber(price_rpg)) then
  295.                 giveWeapon(source, 35, 1)
  296.                 takePlayerMoney(source, tonumber(price_rpg))
  297.                 outputChatBox("You bought a RPG.", source, 0, 255, 0)
  298.             else
  299.                 outputChatBox("You do not have enough money to buy a RPG.", source, 255, 0, 0)
  300.             end
  301.        
  302.         elseif(weapon_name == "weapon_grenade") then
  303.             if(player_money >= tonumber(price_grenade)) then
  304.                 giveWeapon(source, 16, 1)
  305.                 takePlayerMoney(source, tonumber(price_grenade))
  306.                 outputChatBox("You bought a flame Grenade.", source, 0, 255, 0)
  307.             else
  308.                 outputChatBox("You do not have enough money to buy a Grenade.", source, 255, 0, 0)
  309.             end
  310.        
  311.         elseif(weapon_name == "weapon_motolov") then
  312.             if(player_money >= tonumber(price_motolov)) then
  313.                 giveWeapon(source, 37, 1)
  314.                 takePlayerMoney(source, tonumber(price_motolov))
  315.                 outputChatBox("You bought a motolov.", source, 0, 255, 0)
  316.             else
  317.                 outputChatBox("You do not have enough money to buy a motolov.", source, 255, 0, 0)
  318.             end
  319.        
  320.         elseif(weapon_name == "weapon_satchel") then
  321.             if(player_money >= tonumber(price_satchel)) then
  322.                 giveWeapon(source, 39, 1)
  323.                 takePlayerMoney(source, tonumber(price_satchel))
  324.                 outputChatBox("You bought a satchel.", source, 0, 255, 0)
  325.             else
  326.                 outputChatBox("You do not have enough money to buy a satchel.", source, 255, 0, 0)
  327.             end
  328.        
  329.         elseif(weapon_name == "weapon_teargas") then
  330.             if(player_money >= tonumber(price_ft)) then
  331.                 giveWeapon(source, 17, 1)
  332.                 takePlayerMoney(source, tonumber(price_ft))
  333.                 outputChatBox("You bought a teargas.", source, 0, 255, 0)
  334.             else
  335.                 outputChatBox("You do not have enough money to buy a teargas.", source, 255, 0, 0)
  336.             end
  337.                
  338.         elseif(weapon_name == "weapon_fire") then
  339.             if(player_money >= tonumber(price_fire)) then
  340.                 giveWeapon(source, 42, 1)
  341.                 takePlayerMoney(source, tonumber(price_fire))
  342.                 outputChatBox("You bought a fire extinguisher.", source, 0, 255, 0)
  343.             else
  344.                 outputChatBox("You do not have enough money to buy a fire extinguisher.", source, 255, 0, 0)
  345.             end
  346.                
  347.         elseif(weapon_name == "weapon_parachute") then
  348.             if(player_money >= tonumber(price_parachute)) then
  349.                 giveWeapon(source, 46, 1)
  350.                 takePlayerMoney(source, tonumber(price_parachute))
  351.                 outputChatBox("You bought a flame thrower.", source, 0, 255, 0)
  352.             else
  353.                 outputChatBox("You do not have enough money to buy a parachute.", source, 255, 0, 0)
  354.             end
  355.                
  356.         elseif(weapon_name == "weapon_baseball") then
  357.             if(player_money >= tonumber(price_baseball)) then
  358.                 giveWeapon(source, 5)
  359.                 takePlayerMoney(source, tonumber(price_baseball))
  360.                 outputChatBox("You bought a baseball bat.", source, 0, 255, 0)
  361.             else
  362.                 outputChatBox("You do not have enough money to buy a baseball bat.", source, 255, 0, 0)
  363.             end
  364.                
  365.         elseif(weapon_name == "weapon_cane") then
  366.             if(player_money >= tonumber(price_cane)) then
  367.                 giveWeapon(source, 15)
  368.                 takePlayerMoney(source, tonumber(price_cane))
  369.                 outputChatBox("You bought a cane.", source, 0, 255, 0)
  370.             else
  371.                 outputChatBox("You do not have enough money to buy a cane.", source, 255, 0, 0)
  372.             end
  373.                
  374.         elseif(weapon_name == "weapon_chainsaw") then
  375.             if(player_money >= tonumber(price_chainsaw)) then
  376.                 giveWeapon(source, 9)
  377.                 takePlayerMoney(source, tonumber(price_chainsaw))
  378.                 outputChatBox("You bought a chainsaw.", source, 0, 255, 0)
  379.             else
  380.                 outputChatBox("You do not have enough money to buy a chainsaw.", source, 255, 0, 0)
  381.             end
  382.                
  383.         elseif(weapon_name == "weapon_golf") then
  384.             if(player_money >= tonumber(price_golf)) then
  385.                 giveWeapon(source, 2)
  386.                 takePlayerMoney(source, tonumber(price_golf))
  387.                 outputChatBox("You bought a golf club.", source, 0, 255, 0)
  388.             else
  389.                 outputChatBox("You do not have enough money to buy a golf club.", source, 255, 0, 0)
  390.             end
  391.                
  392.         elseif(weapon_name == "weapon_pool") then
  393.             if(player_money >= tonumber(price_pool)) then
  394.                 giveWeapon(source, 7)
  395.                 takePlayerMoney(source, tonumber(price_pool))
  396.                 outputChatBox("You bought a pool cue.", source, 0, 255, 0)
  397.             else
  398.                 outputChatBox("You do not have enough money to buy a pool cue.", source, 255, 0, 0)
  399.             end
  400.                
  401.         elseif(weapon_name == "weapon_katana") then
  402.             if(player_money >= tonumber(price_katana)) then
  403.                 giveWeapon(source, <!-- s8) --><img src=\"{SMILIES_PATH}/icon_cool.gif\" alt=\"8)\" title=\"Cool\" /><!-- s8) -->
  404.                 takePlayerMoney(source, tonumber(price_katana))
  405.                 outputChatBox("You bought a katana.", source, 0, 255, 0)
  406.             else
  407.                 outputChatBox("You do not have enough money to buy a katana.", source, 255, 0, 0)
  408.             end
  409.                
  410.         elseif(weapon_name == "weapon_knife") then
  411.             if(player_money >= tonumber(price_knife)) then
  412.                 giveWeapon(source, 4)
  413.                 takePlayerMoney(source, tonumber(price_knife))
  414.                 outputChatBox("You bought a knife.", source, 0, 255, 0)
  415.             else
  416.                 outputChatBox("You do not have enough money to buy a knife.", source, 255, 0, 0)
  417.             end
  418.                
  419.         elseif(weapon_name == "weapon_nightstick") then
  420.             if(player_money >= tonumber(price_nightstick)) then
  421.                 giveWeapon(source, 3)
  422.                 takePlayerMoney(source, tonumber(price_nightstick))
  423.                 outputChatBox("You bought a nightstick.", source, 0, 255, 0)
  424.             else
  425.                 outputChatBox("You do not have enough money to buy a nightstick.", source, 255, 0, 0)
  426.             end
  427.                
  428.         elseif(weapon_name == "weapon_shovel") then
  429.             if(player_money >= tonumber(price_shovel)) then
  430.                 giveWeapon(source, 6)
  431.                 takePlayerMoney(source, tonumber(price_shovel))
  432.                 outputChatBox("You bought a shovel.", source, 0, 255, 0)
  433.             else
  434.                 outputChatBox("You do not have enough money to buy a shovel.", source, 255, 0, 0)
  435.             end
  436.        end
  437.      end
  438. addEvent("onClientBuyWeapon", true)
  439. addEventHandler("onClientBuyWeapon", getRootElement(), BuyWeaponOnServer)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement