Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: dostęp
1. dostęp markera
Witam przychodz? z pytanie o u?ycie markera

addEventHandler
("onClientMarkerHit"marker_oddania, function(hit)
    if 
hit ~= localPlayer then return end
    local veh 
getPedOccupiedVehicle(hit)
    if 
not veh then return end
    
if not getElementData(veh,"vehicle:id"then return end
    local owner 
getElementData(veh,"vehicle:ownedPlayer")
    if 
owner ~= getElementData(hit,"player:sid"then return end
    
if getVehicleController(veh) ~= hit then return end
    addEventHandler
("onClientRender"rootoddawanie_pojazdu)
    
showCursor(true)
end)

i chcia?bym by by?o to aktywne tylko tutaj po stronie serwera
addEvent("xxx"true)
addEventHandler("xxx"getRootElement(), function(plr)
2. Nie moge dać dostęp innej randze
Chica?bym doda? jeszcze dost?p randze 3
addCommandHandler("qkx.vip",function(plr,cmd,cel,dni
    if 
exports['pystories-admins']:getAdmin(plr,4then
    
if not cel then outputChatBox("/qkx.vip [gracz] [dni]",plr) return end
    
if not dni then outputChatBox("/qkx.vip [gracz] [dni]",plr) return end
    
if not tonumber(dnithen outputChatBox("/qkx.vip [gracz] [dni]",plr) return end
        local target
=exports["pystories-core"]:findPlayer(plr,cel)
3. Warsztaty i dostęp do nich
mam problem poniewa? nie daje ko?a.
[code]local punkty_brania_kol={
-- {-2042.60,162.87,28.84-0.9,1.5, faction_id=3}, --idlewood

}

local warsztatyid = {
[3]=true,
}

for i,v in ipairs(punkty_brania_kol) do
v.marker=createMarker(v[1],v[2],v[3],"cylinder", v[4], 0,0,0,100)
setElementData(v.marker, "braniekola", true)
setElementData(v.marker, "faction:id", v.faction_id)
end


local function czyPracownikWarsztatu(gracz)
local lfid=getElementData(gracz,"faction:id") or -1
if not warsztatyid[lfid] then return false end
return true
end

local function najblizszeKolo(gracz,pojazd)
-- easy peasy
local xg,yg,zg=getElementPosition(gracz)
local najblizszeKolo=nil
local najblizszeDist=1000

local x,y,z=getElementPosition(pojazd)
local _,_,rz=getElementRotation(pojazd)

for i=1,4 do
local rrz=math.rad(rz+45+(i-1)*90)
local x= x + (1 * math.sin(-rrz))
local y= y + (1 * math.cos(-rrz))
if not najblizszeKolo or getDistanceBetweenPoints2D(x,y,xg,yg)<najblizszeDist then
najblizszeDist=getDistanceBetweenPoints2D(x,y,xg,yg)
najblizszeKolo=i
end
end
-- ugly
if not najblizszeKolo then return nil end
if najblizszeKolo==4 then return 3
elseif najblizszeKolo==3 then return 4 end
return najblizszeKolo
end

local function zalozKolo(plr)

local x,y,z=getElementPosition(plr)
local _,_,rz=getElementRotation(plr)

local rrz=math.ra...