Advertisement
Bonika

Untitled

Jan 12th, 2020
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.71 KB | None | 0 0
  1.  
  2. function mapLoad ( name )
  3. createObject (851, -2145.0131835938, -134.62689208984, 35.8)
  4. createObject (851, -2146.5131835938, -134.62689208984, 35.8)
  5. createObject (851, -2148.0131835938, -134.62689208984, 35.8)
  6.  
  7. createObject (851, -2145.0131835938, -136.62689208984, 35.8, 0, 0, 120)
  8. createObject (851, -2146.5131835938, -136.62689208984, 35.8, 0, 0, 120)
  9. createObject (851, -2148.0131835938, -136.62689208984, 35.8, 0, 0, 120)
  10. end
  11. addEventHandler ( "onResourceStart", resourceRoot, mapLoad )
  12.  
  13. col = createColSphere(-2146.1701660156, -136.81063842773, 36.522750854492, 10.0)
  14. setElementData("timerEnabled", player, false)
  15.  
  16. addCommandHandler("keres", function(player, cmd)
  17. if not isElementWithinColShape(player, col) then return outputChatBox("RiseMTA: Nem vagy ott!", player) end
  18. if not getElementData(player, "timerEnabled") then
  19. setElementData(player, "timerEnabled", true)
  20. timer = setTimer(function()
  21. setElementData(player, "timerEnabled", false)
  22. end, 30000, 1)
  23. exports.rise_chat:sendLocalMeAction(player, "Kutatni kezdett a szemétben")
  24. setPedAnimation(player, "BOMBER", "BOM_Plant", -1, true, false, false)
  25. setTimer(setPedAnimation, 1000*10, 1, player)
  26. local randomItem = math.random(2,#randomItems)
  27. exports.rise_item:giveItem(player,randomItems[randomItem][1],randomItems[randomItem][2],1,0)
  28. return
  29. else
  30. outputChatBox("RiseMTA: Nem lehet!", player)
  31. end
  32. end)
  33.  
  34. randomItems = {
  35.  
  36. {3,1},{3,1},{3,1},{3,1},{3,1},{3,1},
  37. {5,1},{5,1},{5,1},{5,1},{5,1},{5,1},
  38. {27,10},{27,2},{27,1},{27,20},{27,20},{27,12},
  39. {150,10},{150,2},{150,1},{150,20},{150,20},{150,12},
  40. {19,1},{19,2},{19,1},{19,2},{19,2},{19,2},
  41. {7,1},{7,2},{7,1},{7,2},{7,2},{7,2},
  42. {216,1},{216,1},{216,1},{216,1},{216,1},{216,1},
  43. {219,1},{219,1},{219,1},{219,1},{219,1},{219,1},
  44.  
  45.  
  46. }
  47. local piszkoselad =
  48. --id ár
  49. {
  50. {208, 1},
  51. }
  52. local elado2 = {}
  53. local elado = {
  54. {240, -2143.9018554688, -146.3910369873, 36.472557067871, "Piszkos Géza", 150, 0, 10, 90}
  55. }
  56. addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function ()
  57. for index, value in ipairs (elado) do
  58. if isElement(elado2[index]) then destroyElement(elado2[index]) end
  59. elado2[index] = createPed(value[1], value[2], value[3], value[4])
  60. setPedRotation(elado2[index], value[6])
  61. setElementData(elado2[index], "ped:name", value[5])
  62. setElementData(elado2[index], "sell:piszkos", true)
  63. setElementFrozen(elado2[index],true)
  64. end
  65. end)
  66.  
  67. function piszkospenz(element)
  68. for key, value in ipairs(piszkoselad) do
  69. triggerClientEvent(element, "deleteItem22", element, value[1],value[2])
  70. end
  71. end
  72. addEvent("sell:piszkos", true)
  73. addEventHandler("sell:piszkos", root, piszkospenz)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement