--[[
Developed by Yolos
All rights reserved!
You cannot use this without permission!
--]]
local skins={
["SAMC"]={
code="SAMC",
positions={
{1565.27,-2606.03,13.56,70,"Skin Dyrektora",120,20,2},
{1564.75,-2608.28,13.56,132,"Skin Lekarza",120,20,9},
{1567.38,-2599.74,13.56,275,"Skin Szpitalny",120, 20},
--{-2722.25,688.96,51.23,274,"Skin ratownika"},
--{-2714.70,689.31,51.23,70,"Skin Kadra"},
{1569.91,-2599.64,13.56,274,"Skin Pielegniarzy",120,20},
{1565.07,-2600.77,13.56,178,"Skin Ratownika",120,20},
},
text="* Nie jeste? na s?u?bie, lub nie jeste? zatrudniony(a) we frakcji SAMC.",
},
["SAPD"]={
code="SAPD",
positions={
--{-6741.48, -1460.61, 97.26,301,"Skin\nGeneralnego\nInspektora",0,0,98},
--{-6755.12, -1468.03, 97.26,71,"Skin #1",0,0,1},
--{-6758.02, -1467.89, 97.26,282,"Skin #2",0,0,7},
--{-6760.61, -1467.82, 97.26,283,"Skin #3",0,0,3},
--{-6763.14, -1467.78, 97.26,271,"Skin #4",0,0,2}, -- 271 ~ 292
--{-6766.26, -1467.70, 97.26,268,"Skin #5",0,0,4},
--{-6766.14, -1464.14, 97.26,267,"Skin #6",0,0,5},
--{-6763.22, -1462.68, 97.26,292,"Skin #7",0,0,6}, -- 292 ~ 271
{-43.24,28.77,980.61,71,"Szkoleniowiec", 0, 2, 1},
{-43.24,26.80,980.61,281,"SAPD\n5", 0, 2, 2},
{-43.24,25.06,980.61,301,"Kadra", 0, 2, 98},
{-43.23,22.94,980.61,285,"SAPD\n1", 0, 2, 6},
{-46.50,21.36,980.61,284,"SAPD\n2", 0, 2, 5},
{-46.50,23.27,980.61,283,"SAPD\n3", 0, 2, 4},
{-46.50,25.61,980.61,282,"SAPD\n4", 0, 2, 3},
{-46.50,28.09,980.61,301,"Zarz?d", 0, 2, 98},
},
text="* Nie jeste? na s?u?bie, lub nie jeste? zatrudniony(a) we frakcji SAPD.",
},
["TSA"]={
code="TSA",
positions={
{1485.09, 674.88, 10.76, 299,"Skin taks?wkarza", 0, 0, 2},
},
text="* Nie jeste? na s?u?bie, lub nie jeste? zatrudniony(a) we frakcji TSA",
},
["PSP"]={
code="PSP",
positions={
{-2106.23, 6.50, 35.32, 279,"Skin PSP", 0, 0, 98},
{-2106.04, 9.26, 35.32, 274,"Skin Ratownika", 0, 0, 2},
--{1931.07, 598.80, 10.85, 290,"Skin Kadry", 0, 0, 98},
{-2106.10, 11.71, 35.32, 277,"Skin A-PSP", 0, 0, 1},
--{1930.95, 604.96, 10.85, 201,"Skin Koszarowy", 0, 0, 1},
},
text="* Nie jeste? na s?u?bie, lub nie jeste? zatrudniony(a) we frakcji PSP.",
},
["SARA"]={
code="SARA",
positions={
{1043.09, 1272.90, -29.03, 16,"Skin 1", 0, 0, 0},
{1045.76, 1273.55, -29.03, 27,"Skin 2", 0, 0, 0},
{1048.75, 1273.01, -29.03, 143,"Skin Zarz?du", 0, 0, 0},
},
text="* Nie jeste? na s?u?bie, lub nie jeste? zatrudniony(a) we frakcji SARA.",
},
["ASA"]={
code="ASA",
positions={
--{-2116.59, -42.96, 45.20, 279,"Skin Kadry", 0, 0, 98},
{219.64,1860.30,13.15, 73,"Skin ASA_1", 0, 0, 2},
--{-2125.86, -42.10, 45.20, 290,"Skin Kadry", 0, 0, 98},
{222.25,1862.72,13.15, 179,"Skin ASA_2", 0, 0, 1},
--{2152.34,-2279.36,20.67, 287,"Skin ASA_3", 0, 0, 5},
},
text="* Nie jeste? na s?u?bie, lub nie jeste? zatrudniony(a) we frakcji ASA.",
},
["SWAT"]={
code="SWAT",
positions={
--{-6741.48, -1460.61, 97.26,301,"Skin\nGeneralnego\nInspektora",0,0,98},
--{-6755.12, -1468.03, 97.26,71,"Skin #1",0,0,1},
--{-6758.02, -1467.89, 97.26,282,"Skin #2",0,0,7},
--{-6760.61, -1467.82, 97.26,283,"Skin #3",0,0,3},
--{-6763.14, -1467.78, 97.26,271,"Skin #4",0,0,2}, -- 271 ~ 292
--{-6766.26, -1467.70, 97.26,268,"Skin #5",0,0,4},
--{-6766.14, -1464.14, 97.26,267,"Skin #6",0,0,5},
--{-6763.22, -1462.68, 97.26,292,"Skin #7",0,0,6}, -- 292 ~ 271
--{-43.24,28.77,980.61,71,"Szkoleniowiec", 0, 2, 1},
--{-43.24,26.80,980.61,281,"SAPD\n5", 0, 2, 2},
--{-43.24,25.06,980.61,301,"Kadra", 0, 2, 98},
--{-43.23,22.94,980.61,285,"SAPD\n1", 0, 2, 6},
--{-46.50,21.36,980.61,284,"SAPD\n2", 0, 2, 5},
--{-46.50,23.27,980.61,283,"SAPD\n3", 0, 2, 4},
--{-46.50,25.61,980.61,282,"SAPD\n4", 0, 2, 3},
{-47.48, 45.59, 980.61,301,"Zarz?d", 0, 2, 97},
},
text="* Nie jeste? na s?u?bie, lub nie jeste? zatrudniony(a) we frakcji SWAT.",
},
}
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)
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])
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(skins[faction].text, el)
cancelEvent()
return end
if rank then
if rank > getElementData(el,"player:rank") then
outputChatBox(skins[faction].text, el)
cancelEvent()
return end
end
setElementModel(el,skin)
end)