Advertisement
Guest User

Untitled

a guest
May 23rd, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.61 KB | None | 0 0
  1. local skins={
  2. ["SAPD"]={
  3. code="SAPD",
  4. positions={
  5. {1554.28, 1501.27, 10.84, 280, "masnofest", 0, 0, 10},
  6. {2317.11, 2559.21, 7506.10, 71, "", 0, 0, 1},
  7. {2316.71, 2569.65, 7506.10, 282, "", 0, 0, 20},
  8. {2315.95, 2567.02, 7506.10, 281, "", 0, 0, 15},
  9. {2315.95, 2563.41, 7506.10, 285, "", 0, 0, 10},
  10. {2320.21, 2569.65, 7506.10, 284, "", 0, 0, 15},
  11. },
  12. text="Nie jesteś zatrudniony/a we frakcji:\n#bf0101SAPD #FFFFFF(#bf0101San Andreas Police Department#FFFFFF)",
  13. },
  14. ["SAFD"]={
  15. code="SAFD",
  16. positions={
  17. {-2106.08, 6.82, 35.32, 279, "SAFD\nStrój bojowy", 0, 0, 1},
  18. {-2127.63, 9.06, 39.89, 291,"SAFD\nStrój koszarowy",0, 0, 1},
  19. {-2106.08, 11.45, 35.32, 277,"SAFD\nStrój bojowy (AODO)",0, 0, 10},
  20. {-2107.00, -28.22, 39.89, 278,"SAFD\nStrój zarządu", 0, 0, 96},
  21.  
  22. },
  23. text="Nie jesteś zatrudniony/a we frakcji:\n#bf0101SAFD #FFFFFF(#bf0101San Andreas Fire Department#FFFFFF)",
  24. },
  25. ["SAMD"]={
  26. code="SAMD",
  27. positions={
  28. {1279.60, -1264.16, 9048.13, 276, "SAMD\nStrój pielęgniarza", 0, 0, 1},
  29. {1277.71, -1264.16, 9048.13, 275, "SAMD\nStrój ratownika medycznego",0, 0, 10},
  30. {1277.88, -1281.55, 9048.13, 156, "SAMD\nStrój lekarza",0,0,40},
  31. {1264.34, -1282.48, 9048.13, 290, "SAMD\nStrój dyrekcji",0,0,70},
  32. {1264.12, -1262.56, 9048.13, 295, "SAMD\nStrój szkoleniowca",0,0,70},
  33. },
  34. text="Nie jesteś zatrudniony/a we frakcji:\n#bf0101SAMD #FFFFFF(#bf0101San Andreas Medical Department#FFFFFF)",
  35. },
  36. ["SARA"]={
  37. code="SARA",
  38. positions={
  39. {1045.13, 1273.38, -29.03, 260, "SARA\nStrój", 0, 0, 10},
  40. {1046.88, 1273.38, -29.03, 27, "SARA\nStrój",0, 0, 10},
  41. },
  42. text="Nie jesteś zatrudniony/a we frakcji:\n#bf0101SARA #FFFFFF(#bf0101San Andreas Road Assistance#FFFFFF)",
  43. },
  44. }
  45.  
  46. for _,skin in pairs(skins) do
  47. for _,pos in ipairs(skin.positions) do
  48. local pickup=createPickup(pos[1], pos[2], pos[3], 3, 1275, 2000)
  49. --local pickup=createMarker(pos[1], pos[2], pos[3]-1, "cylinder", 1.1, 0, 100, 0, 50)
  50. --setElementData(pickup, 'typ', 'ubranko')
  51.  
  52. setElementDimension(pickup,pos[6])
  53. setElementInterior(pickup,pos[7])
  54. setElementData(pickup,"p:faction",tostring(skin.code))
  55. setElementData(pickup,"p:skin", tonumber(pos[4]))
  56. setElementData(pickup,"p:rank", pos[8] or 1)
  57. local t=createElement("text")
  58. setElementData(t,"name",pos[5] or "Skin")
  59. setElementDimension(t,pos[6])
  60. setElementInterior(t,pos[7])
  61. setElementPosition(t,pos[1],pos[2],pos[3]+1)
  62. end
  63. end
  64.  
  65. addEventHandler("onPickupHit", resourceRoot, function(el,md)
  66. if getElementType(el)~="player" then return end
  67. local faction=getElementData(source,"p:faction")
  68. if not faction then return end
  69. local skin=getElementData(source,"p:skin")
  70. local rank=getElementData(source,"p:rank")
  71. if not skin then return end
  72. if not getPlayerFaction(el,faction) or getElementData(el,"player:faction") ~= faction then
  73. --outputChatBox("#bf0101(✖) #FFFFFF"..skins[faction].text..".", el,255,255,255,true)
  74. --exports.notification:showBox (el,"info",skins[faction].text)
  75. triggerClientEvent( el, "onClientAddNotification", el, skins[faction].text, "error" )
  76. cancelEvent()
  77. return end
  78. if rank then
  79. if rank > getElementData(el,"player:rank") then
  80. --outputChatBox(skins[faction].text, el)
  81. --exports.notification:showBox (el,"info",skins[faction].text)
  82. triggerClientEvent( el, "onClientAddNotification", el, "Twój stopień jest zbyt niski..", "info" )
  83. cancelEvent()
  84. return end
  85. end
  86. setElementModel(el,skin)
  87. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement