Tak nie dzia?a mi branie skina pojawia marker wchodz? w niego i nie daje skina, nie wiem dlaczego
kodzik:
[lua]
local marker=createMarker(-6727.30, -1478.71, 97.26-1, 'cylinder', 2, 50, 90, 255, 75)
setElementDimension(marker, 0)
setElementInterior(marker, 0)
local licz = {}
local t=createElement('text')
setElementData(t,'name','Los Santos Police DepartamentnLSPDnRozpocz?cie s?u?by')
setElementDimension(t, 0)
setElementInterior(t, 0)
setElementPosition(t,-6727.30, -1478.71, 97.26)
function isPlayerInPoliceFaction(plr)
local uid=getElementData(plr,'player:uid')
if not uid then return end
local result=exports['ogrpg-db']:dbGet('SELECT 1 FROM ogrpg_factions WHERE code=? AND uid=? LIMIT 1;', "LSPD", uid)
if result[1] then
return true
else
return false
end
end
addEventHandler('onMarkerHit', marker, function(el,md)
if isPlayerInPoliceFaction(el) then
if not getElementData(el,'player:duty') then
setElementData(el,"last:skin",getElementModel(el))
setElementModel(el,71)
outputChatBox("Rozpocz??e? prac? jako Policjant!",el,50,90,200)
exports['frakcja']:rozpocznijnaliczanie(el)
setElementData(el,'player:duty','LSPD')
local rank = exports['frakcja']:getPlayerFactionRank(el,'LSPD')
setElementData(el,"player:rank",rank)
giveWeapon(el,23,9999)
setElementData(el,"last:nick",getPlayerName(el))
setElementData(el,"last:color",tostring(getPlaye... |