Wysłany: 2017-01-28, 17:29
amited
Wiek: 26 Na forum: 3714 dni Posty: 1233
Nick w MP: Amited
Piwa : 512
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 ? r ? wybra ? mechanik do zamontowania
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
W tym pliku od admina daj wyj?tek na elementdate 'montuje' i po problemie.
Wysłany: 2017-01-28, 19:25
amited
Wiek: 26 Na forum: 3714 dni Posty: 1233
Nick w MP: Amited
Piwa : 512
jak doda? ten wyj?tek? w jakim pliku
Podpis
"amited" napisał/a :
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
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 ) .. ")" , 1 )
cancelEvent ()
if g_Prefs . clientcheckban then
local reason = "admin checkClient (" .. tostring ( desc ) .. ")"
addBan ( ipAddress , nil , nil , getRootElement (), reason )
end
return true
end
if checkAccess and g_Prefs . securitylevel >= 1 then
if type ( checkAccess ) == 'string' then
if hasObjectPermissionTo ( player , checkAccess ) 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.
Wysłany: 2017-01-28, 20:07
amited
Wiek: 26 Na forum: 3714 dni Posty: 1233
Nick w MP: Amited
Piwa : 512
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 ) .. ")" , 1 )
cancelEvent ()
if g_Prefs . clientcheckban then
local reason = "admin checkClient (" .. tostring ( desc ) .. ")"
addBan ( ipAddress , nil , nil , getRootElement (), reason )
end
return true
end
if checkAccess and g_Prefs . securitylevel >= 1 then
if type ( checkAccess ) == 'string' then
if hasObjectPermissionTo ( player , checkAccess ) 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 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
To linijki z 1490 ju? zamienione na Twoje ale dalej ten sam b??d
Podpis
"amited" napisał/a :
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
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 ) .. ")" , 1 )
cancelEvent ()
if g_Prefs . clientcheckban then
local reason = "admin checkClient (" .. tostring ( desc ) .. ")"
addBan ( ipAddress , nil , nil , getRootElement (), reason )
end
return true
end
if checkAccess and g_Prefs . securitylevel >= 1 then
if type ( checkAccess ) == 'string' then
if hasObjectPermissionTo ( player , checkAccess ) 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
Tagi: admin :: security
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: