Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2017-01-28, 17:29


amited







Wiek: 26
Na forum: 3714 dni
Posty: 1233
Nick w MP: Amited

Piwa: 512

Respekt: 466
Respekt: 466

Je?eli mech co? montuje to ustawia elementDate na gracza w poje?dzie ale wysakuje ten b??d:
http://scr.hu/59s5/b8hm5
A tutaj skrawek kodu

local wlasciciel=getVehicleController(veh)
if not wlasciciel then return end
if wybrany then -- wybrany to selectRow z gui
setElementData(wlasciciel,"montuje",id) -- id to id cz??ci kt?rwybramechanik do zamontowania


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-01-28, 18:37


marcin778

Krytyk serwerów MTA






Wiek: 24
Na forum: 4149 dni
Posty: 2268
Nick w MP: Marcineg

Piwa: 4662

Respekt: 1436,8
Respekt: 1436,8

W tym pliku od admina daj wyj?tek na elementdate 'montuje' i po problemie.

Podpis
Moje prace: https://www.youtube.com/c...MuaWGHPp1mhlGnw

-- obecnie
-- obecnie
-- dawniej
-- dawniej
-- dawniej
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-01-28, 19:25


amited







Wiek: 26
Na forum: 3714 dni
Posty: 1233
Nick w MP: Amited

Piwa: 512

Respekt: 466
Respekt: 466

jak doda? ten wyj?tek? w jakim pliku

Podpis
"amited" napisał/a:
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-01-28, 19:44


marcin778

Krytyk serwerów MTA






Wiek: 24
Na forum: 4149 dni
Posty: 2268
Nick w MP: Marcineg

Piwa: 4662

Respekt: 1436,8
Respekt: 1436,8

w pliku admin_server.lua

Czy kod od linijki 1457 do linijki 1488 wygl?da tak?

function checkClient(checkAccess,player,...)
    if client and client ~= player and g_Prefs.securitylevel >= 2 then
        if getElementData(client"montuje"then return end
        local desc table.concat({...}," ")
        local ipAddress getPlayerIP(client)
        outputDebugString"Admin security - Client/player mismatch from " .. tostring(ipAddress) .. " (" .. tostring(desc) .. ")")
        cancelEvent()
        if g_Prefs.clientcheckban then
            local reason "admin checkClient (" .. tostring(desc) .. ")"
            addBan ipAddressnilnilgetRootElement(), reason )
        end
        return true
    end
    if checkAccess and g_Prefs.securitylevel >= 1 then
        if type(checkAccess) == 'string' then
            if hasObjectPermissionTo playercheckAccess then
                return false    -- Access ok
            end
            if hasObjectPermissionTo player"general.adminpanel" then
                outputDebugString"Admin security - Client does not have required rights ("..checkAccess.."). " .. tostring(ipAddress) .. " (" .. tostring(desc) .. ")" )
                return true        -- Low risk fail Can't do specific command, but has access to admin panel
            end
        end
        if not hasObjectPermissionTo ( player, "general.adminpanel" ) then
            local desc = table.concat({...}," ")
            local ipAddress = getPlayerIP(client or player)
            outputDebugString( "Admin security - Client without admin panel rights trigged an admin panel event. " .. tostring(ipAddress) .. " (" .. tostring(desc) .. ")", 2 )
            return true            -- High risk fail - No access to admin panel
        end
    end
    return false
end


Je?li tak to zamie? oryginalny kod w tych linijek na ten w/w.

Podpis
Moje prace: https://www.youtube.com/c...MuaWGHPp1mhlGnw

-- obecnie
-- obecnie
-- dawniej
-- dawniej
-- dawniej
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-01-28, 20:07


amited







Wiek: 26
Na forum: 3714 dni
Posty: 1233
Nick w MP: Amited

Piwa: 512

Respekt: 466
Respekt: 466


function checkClient(checkAccess,player,...)
    if client and client ~= player and g_Prefs.securitylevel >= 2 then
        if getElementData(client"montuje"then return end
        local desc table.concat({...}," ")
        local ipAddress getPlayerIP(client)
       outputDebugString"Admin security - Client/player mismatch from " .. tostring(ipAddress) .. " (" .. tostring(desc) .. ")")
       cancelEvent()
        if g_Prefs.clientcheckban then
            local reason "admin checkClient (" .. tostring(desc) .. ")"
            addBan ipAddressnilnilgetRootElement(), reason )
        end
        return true
    end
    if checkAccess and g_Prefs.securitylevel >= 1 then
        if type(checkAccess) == 'string' then
            if hasObjectPermissionTo playercheckAccess then
                return false    -- Access ok
            end
            if hasObjectPermissionTo player"general.adminpanel" then
                outputDebugString"Admin security - Client does not have required rights ("..checkAccess.."). " .. tostring(ipAddress) .. " (" .. tostring(desc) .. ")" )
                return true        -- Low risk fail Cant do specific commandbut has access to admin panel
            end
        end
        if not hasObjectPermissionTo player"general.adminpanel" then
            local desc table.concat({...}," ")
            local ipAddress getPlayerIP(client or player)
            outputDebugString"Admin security - Client without admin panel rights trigged an admin panel event. " .. tostring(ipAddress) .. " (" .. tostring(desc) .. ")")
            return true            -- High risk fail No access to admin panel
        end
    end
    return false
end

To linijki z 1490 ju? zamienione na Twoje ale dalej ten sam b??d

Podpis
"amited" napisał/a:
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-01-28, 20:16


marcin778

Krytyk serwerów MTA






Wiek: 24
Na forum: 4149 dni
Posty: 2268
Nick w MP: Marcineg

Piwa: 4662

Respekt: 1436,8
Respekt: 1436,8

function checkClient(checkAccess,player,...)
    if client and client ~= player and g_Prefs.securitylevel >= 2 then
        if getElementData(player"montuje"then return end
        if getElementData(client"montuje"then return end
        local desc table.concat({...}," ")
        local ipAddress getPlayerIP(client)
        outputDebugString"Admin security - Client/player mismatch from " .. tostring(ipAddress) .. " (" .. tostring(desc) .. ")")
        cancelEvent()
        if g_Prefs.clientcheckban then
            local reason "admin checkClient (" .. tostring(desc) .. ")"
            addBan ipAddressnilnilgetRootElement(), reason )
        end
        return true
    end
    if checkAccess and g_Prefs.securitylevel >= 1 then
        if type(checkAccess) == 'string' then
            if hasObjectPermissionTo playercheckAccess then
                return false    -- Access ok
            end
            if hasObjectPermissionTo player"general.adminpanel" then
                outputDebugString"Admin security - Client does not have required rights ("..checkAccess.."). " .. tostring(ipAddress) .. " (" .. tostring(desc) .. ")" )
                return true        -- Low risk fail Can't do specific command, but has access to admin panel
            end
        end
        if not hasObjectPermissionTo ( player, "general.adminpanel" ) then
            local desc = table.concat({...}," ")
            local ipAddress = getPlayerIP(client or player)
            outputDebugString( "Admin security - Client without admin panel rights trigged an admin panel event. " .. tostring(ipAddress) .. " (" .. tostring(desc) .. ")", 2 )
            return true            -- High risk fail - No access to admin panel
        end
    end
    return false
end


Podpis
Moje prace: https://www.youtube.com/c...MuaWGHPp1mhlGnw

-- obecnie
-- obecnie
-- dawniej
-- dawniej
-- dawniej
Postaw piwo autorowi tego posta
 

 
Tagi: admin :: security
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Admin security Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

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
Dodaj temat do Ulubionych
Wersja do druku