Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local skins={
- ["SAPD"]={
- code="SAPD",
- positions={
- {1554.28, 1501.27, 10.84, 280, "masnofest", 0, 0, 10},
- {2317.11, 2559.21, 7506.10, 71, "", 0, 0, 1},
- {2316.71, 2569.65, 7506.10, 282, "", 0, 0, 20},
- {2315.95, 2567.02, 7506.10, 281, "", 0, 0, 15},
- {2315.95, 2563.41, 7506.10, 285, "", 0, 0, 10},
- {2320.21, 2569.65, 7506.10, 284, "", 0, 0, 15},
- },
- text="Nie jesteś zatrudniony/a we frakcji:\n#bf0101SAPD #FFFFFF(#bf0101San Andreas Police Department#FFFFFF)",
- },
- ["SAFD"]={
- code="SAFD",
- positions={
- {-2106.08, 6.82, 35.32, 279, "SAFD\nStrój bojowy", 0, 0, 1},
- {-2127.63, 9.06, 39.89, 291,"SAFD\nStrój koszarowy",0, 0, 1},
- {-2106.08, 11.45, 35.32, 277,"SAFD\nStrój bojowy (AODO)",0, 0, 10},
- {-2107.00, -28.22, 39.89, 278,"SAFD\nStrój zarządu", 0, 0, 96},
- },
- text="Nie jesteś zatrudniony/a we frakcji:\n#bf0101SAFD #FFFFFF(#bf0101San Andreas Fire Department#FFFFFF)",
- },
- ["SAMD"]={
- code="SAMD",
- positions={
- {1279.60, -1264.16, 9048.13, 276, "SAMD\nStrój pielęgniarza", 0, 0, 1},
- {1277.71, -1264.16, 9048.13, 275, "SAMD\nStrój ratownika medycznego",0, 0, 10},
- {1277.88, -1281.55, 9048.13, 156, "SAMD\nStrój lekarza",0,0,40},
- {1264.34, -1282.48, 9048.13, 290, "SAMD\nStrój dyrekcji",0,0,70},
- {1264.12, -1262.56, 9048.13, 295, "SAMD\nStrój szkoleniowca",0,0,70},
- },
- text="Nie jesteś zatrudniony/a we frakcji:\n#bf0101SAMD #FFFFFF(#bf0101San Andreas Medical Department#FFFFFF)",
- },
- ["SARA"]={
- code="SARA",
- positions={
- {1045.13, 1273.38, -29.03, 260, "SARA\nStrój", 0, 0, 10},
- {1046.88, 1273.38, -29.03, 27, "SARA\nStrój",0, 0, 10},
- },
- text="Nie jesteś zatrudniony/a we frakcji:\n#bf0101SARA #FFFFFF(#bf0101San Andreas Road Assistance#FFFFFF)",
- },
- }
- for _,skin in pairs(skins) do
- for _,pos in ipairs(skin.positions) do
- local pickup=createPickup(pos[1], pos[2], pos[3], 3, 1275, 2000)
- --local pickup=createMarker(pos[1], pos[2], pos[3]-1, "cylinder", 1.1, 0, 100, 0, 50)
- --setElementData(pickup, 'typ', 'ubranko')
- setElementDimension(pickup,pos[6])
- setElementInterior(pickup,pos[7])
- setElementData(pickup,"p:faction",tostring(skin.code))
- setElementData(pickup,"p:skin", tonumber(pos[4]))
- setElementData(pickup,"p:rank", pos[8] or 1)
- local t=createElement("text")
- setElementData(t,"name",pos[5] or "Skin")
- setElementDimension(t,pos[6])
- setElementInterior(t,pos[7])
- setElementPosition(t,pos[1],pos[2],pos[3]+1)
- end
- end
- addEventHandler("onPickupHit", resourceRoot, function(el,md)
- if getElementType(el)~="player" then return end
- local faction=getElementData(source,"p:faction")
- if not faction then return end
- local skin=getElementData(source,"p:skin")
- local rank=getElementData(source,"p:rank")
- if not skin then return end
- if not getPlayerFaction(el,faction) or getElementData(el,"player:faction") ~= faction then
- --outputChatBox("#bf0101(✖) #FFFFFF"..skins[faction].text..".", el,255,255,255,true)
- --exports.notification:showBox (el,"info",skins[faction].text)
- triggerClientEvent( el, "onClientAddNotification", el, skins[faction].text, "error" )
- cancelEvent()
- return end
- if rank then
- if rank > getElementData(el,"player:rank") then
- --outputChatBox(skins[faction].text, el)
- --exports.notification:showBox (el,"info",skins[faction].text)
- triggerClientEvent( el, "onClientAddNotification", el, "Twój stopień jest zbyt niski..", "info" )
- cancelEvent()
- return end
- end
- setElementModel(el,skin)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement