Advertisement
Guest User

Untitled

a guest
Jul 19th, 2019
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.77 KB | None | 0 0
  1. local skins={
  2. ["SAPD"]={
  3. code="SAPD",
  4. positions={
  5. {1597.35, -1655.72, -18.31, 39, "SAPD 1", 0, 0, 0},
  6. {1597.35, -1657.22, -18.31, 65, "SAPD 2", 0, 0, 0},
  7. {1597.35, -1658.61, -18.31, 82, "Posterunkowy ", 0, 0, 0},
  8. {1597.34, -1659.97, -18.31, 81, "Posterunkowy 2", 0, 0, 0},
  9. {1597.35, -1660.97, -18.31, 80, "Posterunkowy 3", 0, 0, 0},
  10. {1597.35, -1662.05, -18.31, 84, "SAPD\nPosterunkowy 4", 0, 0, 0},
  11.  
  12. },
  13. text="Nie jesteś zatrudniony/a we frakcji:n#bf0101SAPD #FFFFFF(#bf0101San Andreas Police Department#FFFFFF)",
  14. },
  15. ["SAFD"]={
  16. code="SAFD",
  17. positions={
  18. {1693.47, -1101.02, 24.08, 279, "SAFD\nStrój Nomex", 0, 0, 0},
  19. {1693.56, -1098.55, 24.08, 288,"SAFD\nStrój Nomex 2",0, 0, 1},
  20. {1693.47, -1096.12, 24.08, 238,"SAFD\nStrój Pełnoprawny",0, 0, 1},
  21. {1695.96, -1095.72, 24.08, 278,"SAFD\nStrój Akademia",0, 0, 1},
  22. {1698.40, -1095.89, 24.08, 244,"SAFD\nStrój Paramedic",0, 0, 1},
  23.  
  24.  
  25. },
  26. text="Nie jesteś zatrudniony/a we frakcji:\n#bf0101SAFD #FFFFFF(#bf0101San Andreas Fire Department#FFFFFF)",
  27. },
  28. ["SAMD"]={
  29. code="SAMD",
  30. positions={
  31. {1279.60, -1264.16, 9048.13, 276, "SAMD\nStrój pielęgniarza", 0, 0, 1},
  32. {1277.71, -1264.16, 9048.13, 275, "SAMD\nStrój ratownika medycznego",0, 0, 10},
  33. {1277.88, -1281.55, 9048.13, 156, "SAMD\nStrój lekarza",0,0,40},
  34. {1264.34, -1282.48, 9048.13, 156, "SAMD\nStrój dyrekcji",0,0,70},
  35. {1264.12, -1262.56, 9048.13, 295, "SAMD\nStrój szkoleniowca",0,0,70},
  36. },
  37. text="Nie jesteś zatrudniony/a we frakcji:\n#bf0101SAMD #FFFFFF(#bf0101San Andreas Medical Department#FFFFFF)",
  38. },
  39. ["SARA"]={
  40. code="SARA",
  41. positions={
  42. {767.23, -3806.52, 224.21, 143, "SARA\nStrój Zarządu", 0, 0, 0},
  43. {771.90, -3786.88, 224.21, 27, "SARA\nStrój",0, 0, 0},
  44. },
  45. text="Nie jesteś zatrudniony/a we frakcji:\n#bf0101SARA #FFFFFF(#bf0101San Andreas Road Assistance#FFFFFF)",
  46. },
  47. }
  48.  
  49. for _,skin in pairs(skins) do
  50. for _,pos in ipairs(skin.positions) do
  51. --local pickup=createPickup(pos[1], pos[2], pos[3], 3, 1275, 2000)
  52. local pickup=createMarker(pos[1], pos[2], pos[3]-1, "cylinder", 1.1, 0, 100, 0, 50)
  53. setElementData(pickup, 'typ', 'ubranko')
  54.  
  55. setElementDimension(pickup,pos[6])
  56. setElementInterior(pickup,pos[7])
  57. setElementData(pickup,"p:faction",tostring(skin.code))
  58. setElementData(pickup,"p:skin", tonumber(pos[4]))
  59. setElementData(pickup,"p:rank", pos[8] or 1)
  60. local t=createElement("text")
  61. setElementData(t,"name",pos[5] or "Skin")
  62. setElementDimension(t,pos[6])
  63. setElementInterior(t,pos[7])
  64. setElementPosition(t,pos[1],pos[2],pos[3]+1)
  65. end
  66. end
  67.  
  68. addEventHandler("onMarkerHit", resourceRoot, function(el,md)
  69. if getElementType(el)~="player" then return end
  70. local faction=getElementData(source,"p:faction")
  71. if not faction then return end
  72. local skin=getElementData(source,"p:skin")
  73. local rank=getElementData(source,"p:rank")
  74. if not skin then return end
  75. if not getPlayerFaction(el,faction) or getElementData(el,"player:faction") ~= faction then
  76. --outputChatBox("#bf0101(✖) #FFFFFF"..skins[faction].text..".", el,255,255,255,true)
  77. --exports.notification:showBox (el,"info",skins[faction].text)
  78. triggerClientEvent( el, "onClientAddNotification", el, skins[faction].text, "error" )
  79. cancelEvent()
  80. return end
  81. if rank then
  82. if rank > getElementData(el,"player:rank") then
  83. --outputChatBox(skins[faction].text, el)
  84. --exports.notification:showBox (el,"info",skins[faction].text)
  85. triggerClientEvent( el, "onClientAddNotification", el, "Twój stopień jest zbyt niski..", "info" )
  86. cancelEvent()
  87. return end
  88. end
  89. setElementModel(el,skin)
  90. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement