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: getadmin
1. attempt to call global 'getAdmin' (a nil value)
Witam co? nie ??czy nie wiem o co chodzi pr?bowa?em co? zmienia? ale nie dzia?a.

B??d : ERROR: [skrypty]/YL-pojazdy/s_vehbuy.lua:278: attempt to call global 'getAdmin' (a nil value)


Skrypt:

addEventHandler
("onVehicleStartEnter"resourceRoot, function(plr,seat,jacked)
    if 
seat == 0 then
        local rent
=getElementData(source"vehicle:rent")
        
local group=getElementData(source"vehicle:ownedGroup")
        if 
group == "0" then group "Brak" end
        local player
=getElementData(source"vehicle:ownedPlayer")
        if (
getAdmin(plr,4)) then
            
return
        
end
        
if rent and (type(rent) == "table"then
            
for i,s in pairs(rent) do
                if 
tonumber(s) == getElementData(plr,"player:sid"then
                
return end
            end
        end
        
        local plrgroup 
getElementData(plr,"player:organization")
        if 
plrgroup then
            
if getSettings(plr,false,"organization") == group then return end
        end
        
if player and player ~= getSettings(plr,false,"owner"then
            outputChatBox
("* Nie posiadasz kluczyk?w do tego pojazdu."plr)
            
cancelEvent()
        
end
    end
end
)