function isPlayerInPoliceFaction(plr)
local uid=getElementData(plr,'player:uid')
if not uid then return end
local accName = getAccountName (getPlayerAccount (plr))
if isObjectInACLGroup ("user."..accName, aclGetGroup ("SAPD")) 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','SAPD')
local rank = exports['frakcja']:getPlayerFactionRank(el,'SAPD')
setElementData(el,"player:rank",rank)
giveWeapon(el,23,9999)
setElementData(el,"last:nick",getPlayerName(el))
setElementData(el,"last:color",tostring(getPlayerNametagColor(el)))
setPlayerName(el,"#0000CD"..getPlayerName(el):gsub("#%x%x%x%x%x%x",""))
executeCommandHandler("setblipcolor",el,0,0,205)
else
takeWeapon(el,23)
outputChatBox("Zako?czy?e? prac? jako Policjant!",el,50,90,200)
exports['frakcja']:zatrzymajnaliczanie(el)
setElementData(el, 'player:duty', false)
setElementData(el,"player:rank",false)
local skin=getElementData(el,"last:skin")
setElementModel(el, skin)
setPlayerName(el,getElementData(el,"last:nick"))
executeCommandHandler("setblipcolor",el,255,255,255)
end
else
outputChatBox('* Nie jeste? zatrudniony jako Policjant!', el, 255, 0, 0)
end
end)
mam problem dalej nie mog? si? zatreudni? wpisuje /login Saperos has?o itd ale no nic mi to nie daje dalej pisze nie jestes zatrudniony tutaj macie wycinek acl
Nie możesz pisać nowych tematów Nie możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz głosować w ankietach