Witam
Problem taki jak tytu? tematu. Chce blipy graczy, lecz bez tych ktorzy sa w policji. Mam gotowy skrypt na blipy, dziala ladnie. Gdy pr?bowa?em tam wcisn?? sprawdzenie czy gracz jest w acl ( chodzi o policje ), to caly skrypt nie dzialal. podam caly skrypt:
[lua] local playerBlipRoot = createElement("playerBlipRoot", "playerBlipRoot")
local function resourceStart()
for _, player in ipairs(getElementsByType("player")) do
if player ~= localPlayer then
local r, g, b = getPlayerNametagColor(player)
local blip = createBlipAttachedTo(player, 0, 2, r, g, b, 255, 1)
setElementParent(blip, playerBlipRoot)
end
end
end
addEventHandler("onClientResourceStart", root, resourceStart)
local function playerJoin()
local r, g, b = getPlayerNametagColor(source)
local blip = createBlipAttachedTo(source, 0, 2, r, g, b, 255, 1)
setElementParent(blip, playerBlipRoot)
setTimer(updateBlipColor, 5000, 1, blip) --Upadate in 5 seconds, in case the server sets the color.
end
addEventHandler("onClientPlayerJoin", root, playerJoin)
local function playerQuit()
for _, blip in ipairs(getElementChildren(playerBlipRoot)) do
if getElementAttachedTo(blip) == source then
destroyElement(blip)
end
end
end
addEventHandler("onClientPlayerQuit", root, playerQuit)
function updateBlipColor(blip)
local player = getElementAttachedTo(blip)
if player then
local r, g, b = getPlayerNametagColo... |