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

Wysłany: 2020-05-10, 12:00


adisonboss







Wiek: 23
Na forum: 3331 dni
Posty: 237

Piwa: 6

Respekt: 50

Witam ! Sprawa wygl?da tak gdy wchodz? na duty admina to nie wy?wietlam si? jako deweloper ani na scoreboard ani /admins i przy nicku r?wnie? nie mam napisu. Dodam ?e serwer stoi na paczce PSSM (ogrpg). Za wszelk? pomoc dzi?kuje i stawiam piwko oraz reputacje

Postaw piwo autorowi tego posta
 

 
Wysłany: 2020-05-10, 12:22


vAnimo

Zielony w luła






Wiek: 19
Na forum: 2312 dni
Posty: 165
Nick w MP: vAnimo

Piwa: 882

Respekt: 70

Mo?e da?e? sobie z?y level

Postaw piwo autorowi tego posta
 

 
Wysłany: 2020-05-10, 12:26


adisonboss







Wiek: 23
Na forum: 3331 dni
Posty: 237

Piwa: 6

Respekt: 50

Mam lvl 5 czyli deweloper

Postaw piwo autorowi tego posta
 

 
Wysłany: 2020-05-10, 13:34


vAnimo

Zielony w luła






Wiek: 19
Na forum: 2312 dni
Posty: 165
Nick w MP: vAnimo

Piwa: 882

Respekt: 70

Aaaa to ju? wszystko wyja?nia.

Prawie ?adna paczka nie wspiera 5 lvl developera, ma on permisje w adminsach lecz nie dodaje nikt go do nametag?w itp.
Je?eli chcesz to wejdz sobie w c_utils.lua w pys admins i dor?b wiadomosc do levela 5
LECZ level 4 ma wi?cej perm ni? level 5. (domy?lnie) wi?c daj sobie level 4 i powiene? mie? all git lub dodaj permisje sobie w adminsach tam w s_cmd.lua i dor?b wiad w utilsach i dodaj do nametagow to bedziesz mogl korzysta? z tego licze na piwerko (mowie na przyk?adzie psrpg)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2020-05-10, 17:47


adisonboss







Wiek: 23
Na forum: 3331 dni
Posty: 237

Piwa: 6

Respekt: 50

Po zmianie na 4 jest to samo

Postaw piwo autorowi tego posta
 

 
Wysłany: 2020-05-10, 19:02


killercycDDS

Migacz






Wiek: 25
Na forum: 4512 dni
Posty: 629
Nick w MP: killer_cyc[DDS]

Piwa: 1659

Respekt: 22

"adisonboss" napisał/a:

Po zmianie na 4 jest to samo

Podstawowe pytania b??dy db3? , poprawnie pod??czony mysql? , co? zmienia?e??

Postaw piwo autorowi tego posta
 

 
Wysłany: 2020-05-10, 22:04


adisonboss







Wiek: 23
Na forum: 3331 dni
Posty: 237

Piwa: 6

Respekt: 50

Brak b??d?w, raczej pod??czone poprawnie bo wszystko inne dzia?a

Postaw piwo autorowi tego posta
 

 
Wysłany: 2020-05-10, 22:20


vAnimo

Zielony w luła






Wiek: 19
Na forum: 2312 dni
Posty: 165
Nick w MP: vAnimo

Piwa: 882

Respekt: 70

pewnie dashboard masz podpiety pod inna baze albo pod inny level lub wgl nie masz tam dodanych levelow

Postaw piwo autorowi tego posta
 

 
Wysłany: 2020-05-11, 10:53


adisonboss







Wiek: 23
Na forum: 3331 dni
Posty: 237

Piwa: 6

Respekt: 50

To chyba fragment skryptu odpowiadaj?cy za to
</
function RGBToHex(red, green, blue, alpha)
if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255) or (alpha and (alpha < 0 or alpha > 255))) then
return nil
end
if(alpha) then
return string.format("#%.2X%.2X%.2X%.2X", red,green,blue,alpha)
else
return string.format("#%.2X%.2X%.2X", red,green,blue)
end
end

function getAdmin(plr,level)
if level then
local result=exports["ogrpg-db"]:dbGet("SELECT * from ogrpg_admins WHERE serial=? AND level=?", getPlayerSerial(plr), level)
if result and #result > 0 then
return true
else
return false
end
else
local result=exports["ogrpg-db"]:dbGet("SELECT * from ogrpg_admins WHERE serial=?", getPlayerSerial(plr))
if result and #result > 0 then
return true
else
return false
end
end
end

function getVisualRank(plr)
if plr then
local result=exports["ogrpg-db"]:dbGet("SELECT visualrank from ogrpg_admins WHERE serial=?", getPlayerSerial(plr))
if result and #result > 0 then
return result[1].visualrank
else
return false
end
end
end

function getLevel(plr)
if plr then
local result=exports["ogrpg-db"]:dbGet("SELECT level from ogrpg_admins WHERE serial=? limit 1", getPlayerSerial(plr))
if result and #result > 0 then
if tonumber(result[1].level) > 0 then
return result[1].level
else
return false
end
else
return false
end
end
end

--[[

rangi = {
[4] = "#800080Developer",
[3] = "#123072Guardian",
[2] = "#ff0000Administrator",
[1] = "#006699Moderator",
[5] = "#00CC00Supporter",
[6] = "#FFA500Skrypter",
}

function wyswietl(plr,tabela)
if not plr then return end
if type(tabela) ~= "table" then outputChatBox("* Aktualnie nie ma administracji na duty",plr,255,0,0) return end
outputChatBox(" ✪ Dost?pna Administracja ✪ ",plr,255,0,0)
for _,s in pairs(tabela) do

outputChatBox("#ff0000"..(getElementData(s[1],"maafka") or "").."#ffffff "..getPlayerName(s[1]):gsub("#%x%x%x%x%x%x","").."#ff0000 ["..getElementData(s[1],"id").."".."] #ccc000"..s[2]:gsub("#%x%x%x%x%x%x","").."",plr,255,255,255,true)
end
end

function cmd_alladmins(plr)
local tabela = {}
local ilosc = 0
for i,v in ipairs(getElementsByType("player")) do
if not getElementData(v,"p:inv") then
if getAdmin(v) then
local rank = getVisualRank(v)
if rank then
ranga = rank
else
ranga = rangi[tonumber(getLevel(v))]
end
if not getElementData(v,"Ryjek") then
tabela[i] = {v,ranga}
ilosc = i
end
end
end
end
if ilosc < 1 then tabela = false end
wyswietl(plr,tabela)
end
function cmd_admins(plr)
local tabela = {}
local ilosc = 0
for i,v in ipairs(getElementsByType("player")) do
if not getElementData(v,"p:inv") then
if getAdmin(v) then
if getElementData(v,"player:admin") then
local rank = getVisualRank(v)
if rank then
ranga = rank
else
ranga = rangi[tonumber(getLevel(v))]
end
if not getElementData(v,"Ryjek") then
tabela[i] = {v,ranga}
ilosc = i
end
end
end
end
end
if ilosc < 1 then tabela = false end
wyswietl(plr,tabela)
end

]]
--addCommandHandler("admins", cmd_admins, false, false)
--addCommandHandler("ekipa", cmd_admins, false, false)

function jestRCONem(gracz)
if getElementData(gracz, "player:level") == 4 then return true end
end
/>

[ Dodano: 2020-05-11, 10:56 ]
Ewentualnie to
</
addCommandHandler("duty", function(plr,cmd)
local pobierz = getElementData(plr,"player:uid")
local result=exports["ogrpg-db"]:dbGet("SELECT * from ogrpg_admins WHERE serial=?", getPlayerSerial(plr))
if result and #result > 0 then
if pobierz == result[1].uid or pobierz == result[1].uid2 then
if getAdmin(plr,6) or getAdmin(plr,5) or getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1) then
if not getElementData(plr,"player:admin") then
giveWeapon(plr,22)
toggleControl(plr, "fire", false)
toggleControl(plr, "action", true)
toggleControl(plr, "aim_weapon", true)
if getAdmin(plr, 1) then
setElementData(plr,"player:level",1)
elseif getAdmin(plr, 2) then
setElementData(plr,"player:level",2)
elseif getAdmin(plr, 3) then
setElementData(plr,"player:level",3)
elseif getAdmin(plr, 4) then
setElementData(plr,"player:level",4)
elseif getAdmin(plr, 5) then
setElementData(plr,"player:level",5)
elseif getAdmin(plr, 6) then
setElementData(plr,"player:level",6)
end
setElementData(plr,"player:admin",true)
outputChatBox("#0053FF[#EBC79EInformacja#0053FF] #919191Zalogowa?e?(a?) si? na #FF0000duty#919191.", plr, 255, 255, 255, true )
outputChatBox("#0053FF[#EBC79EInformacja#0053FF] #919191Wpisz #FF0000/konsola#919191 aby wyswietlic tw?j interfejs#919191.", plr, 255, 255, 255, true )
local text = "* "..getPlayerName(plr).." zalogowa?(a) si? do administracji."..RGBToHex(255,255,255)
triggerEvent("admin:addText", resourceRoot, text,math.random(0,99))
local rank = getVisualRank(plr)
if rank then
setElementData(plr,"player:level",{tonumber(getLevel(plr)),rank})
return
end
else
takeWeapon(plr,22)
toggleControl(plr, "fire", false)
toggleControl(plr, "action", false)
toggleControl(plr, "aim_weapon", false)
removeElementData(plr,"player:admin")
removeElementData(plr,"player:level")
outputChatBox("#0053FF[#EBC79EInformacja#0053FF] #919191Wylogowa?e?(a?) si? z #FF0000duty#919191.", plr, 255, 255, 255, true )
local text = "* "..getPlayerName(plr).." wylogowa?(a) si? z administracji."..RGBToHex(255,255,255)
triggerEvent("admin:addText", resourceRoot, text,math.random(0,99))
end
end
else
end
end
end)
/>

Postaw piwo autorowi tego posta
 

 
Wysłany: 2020-05-16, 02:13


PatryKK.

Emeryt LUA






Wiek: 26
Na forum: 3061 dni
Posty: 1060
Nick w MP: PatryKK.

Piwa: 2322

Respekt: 331,5
Respekt: 331,5Respekt: 331,5Respekt: 331,5

Zacznij od zweryfikowania sp?jno?ci tabel podanych w kodzie do tych u?ywanych w phpmyadmin, sprawd? debugscript

Postaw piwo autorowi tego posta
 

 
Tagi: nie :: wyświetla :: duty :: scoreboard :: /admins
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Nie wyświetla duty na scoreboard i /admins 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