Wysłany: 2018-09-10, 17:08
CinusPL
Wiek: 26 Na forum: 2832 dni Posty: 20
Nick w MP: CinusPL
Witam po wpisaniu debugscript 3 otrzymuje takie b?edy prosze o pomoc, z g?ry dzi?kuje.
Mam jeszcze dwa pytania:
1.Jak nadac sobie admina w dutyadmin bo jak wpsize komende /admins to ze nie ma zadnego admina jest napisane a jestem zalogowany przez login haslo do admina w konsoli
2.Jak kupie autko w salonie to jest napisane ze trafia do przechowali a w przechowalni go nie ma , jak to naprawic ?
Wysłany: 2018-09-10, 17:14
Wilq
Wiek: 24 Na forum: 4428 dni Posty: 3410
Piwa : 739
1. Nie jeste?my czarodziejami i nie znamy kodu na pami??. Zale?y jak? masz elementDat? ustawon? dla Administratora - znajdziesz to w kodzie.
2. Wy?lij kod od przechowalni, nie mamy go przed sob?.
Pierwszy obrazek: brak warto?ci w MySQL dla kolumny 'osoba'.
Co do b??d?w z drugiego obrazka: z?a podmiana skin?w w skrypcie skiny-premium, w ogrpg-gui/fonts nie ma czcionki vopis.ttf, w dohudu nie ma obrazk?w.
Wysłany: 2018-09-10, 17:37
BoomEq
Wiek: 35 Na forum: 3522 dni Posty: 101
Nick w MP: BoomEqqq
Piwa : 20
CinusPL , Nie masz jakiej? kolumny w mysql
Wysłany: 2018-09-10, 18:15
CinusPL
Wiek: 26 Na forum: 2832 dni Posty: 20
Nick w MP: CinusPL
"Wilq" napisał/a :1. Nie jeste?my czarodziejami i nie znamy kodu na pami??. Zale?y jak? masz elementDat? ustawon? dla Administratora - znajdziesz to w kodzie.
2. Wy?lij kod od przechowalni, nie mamy go przed sob?.
Pierwszy obrazek: brak warto?ci w MySQL dla kolumny 'osoba'.
Co do b??d?w z drugiego obrazka: z?a podmiana skin?w w skrypcie skiny-premium, w ogrpg-gui/fonts nie ma czcionki vopis.ttf, w dohudu nie ma obrazk?w.
1.A gdzie to dok?anie sprawdzic ?
2. Mam kody do przechowalni ls, lv to mam dac te wszystkei kody z rozszezeniem lua czy jak bo sie pogubilem
jak kupuje auto w salonie ktore nie trafia do przecho to taki dosatje kod b??d:
a jaka wartosc powinna byc dla kolumny osoba ?
jak mam dac kod to napiszcie doklanie jaki kod i czego, by?a by opcja pomocy przez team speaka 3? bylo by szybciej i prosil dalbym admina na serwie i by mi ktos pomogl prosze.
[ Dodano : 2018-09-10, 18:16 ]
"Norbert1234" napisał/a :Wilq , Kolega ma racje, we? daj kod, a bynajmiej to co Ci napisa? i wtedy podzia?ami, bo ja reaguje po prostu XD co ty tu odwali?e?
jaki mam dac kod to napiszcie doklanie jaki kod i czego, by?a by opcja pomocy przez team speaka 3? bylo by szybciej i prosil dalbym admina na serwie i by mi ktos pomogl prosze.
Wysłany: 2018-09-10, 18:19
Wilq
Wiek: 24 Na forum: 4428 dni Posty: 3410
Piwa : 739
1. Chocia?by kod komendy /admins.
2. Kod jednej przechowalni (oboj?tnie kt?rej) i kod kupna pojazd?w (dok?adnie komenda /kuppojazd) wrzu? na http://www.pastebin.com i odpowiednio je oznacz wysy?aj?c tutaj.
Nie, pomagamy na forum. Mog?e? od razu do??czy? kod, by?oby szybciej ale tego nie zrobi?e? - nie nasza wina.
Wysłany: 2018-09-10, 18:37
CinusPL
Wiek: 26 Na forum: 2832 dni Posty: 20
Nick w MP: CinusPL
"Wilq" napisał/a :1. Chocia?by kod komendy /admins.
2. Kod jednej przechowalni (oboj?tnie kt?rej) i kod kupna pojazd?w (dok?adnie komenda /kuppojazd) wrzu? na http://www.pastebin.com i odpowiednio je oznacz wysy?aj?c tutaj.
Nie, pomagamy na forum. Mog?e? od razu do??czy? kod, by?oby szybciej ale tego nie zrobi?e? - nie nasza wina.
TUTAJ LINK DO orgp-salon: https://pastebin.com/yhKf63LX
a do /admins gdzie znajde ?
Wysłany: 2018-09-10, 19:08
Wilq
Wiek: 24 Na forum: 4428 dni Posty: 3410
Piwa : 739
Domy?lam si?, ?e w ogrpg-duty. Szukaj po frazie 'admins'.
Wracaj?c do salonu z pojazdami - czy w bazie MySQL w tabeli ogrpg_vehicles dodaje Ci sie wpis z nowo kupionym pojazdem?
Wysłany: 2018-09-10, 19:26
CinusPL
Wiek: 26 Na forum: 2832 dni Posty: 20
Nick w MP: CinusPL
"Wilq" napisał/a :Domy?lam si?, ?e w ogrpg-duty. Szukaj po frazie 'admins'.
Wracaj?c do salonu z pojazdami - czy w bazie MySQL w tabeli ogrpg_vehicles dodaje Ci sie wpis z nowo kupionym pojazdem?
nie dodaje sie do bazy
Wysłany: 2018-09-10, 19:30
Wilq
Wiek: 24 Na forum: 4428 dni Posty: 3410
Piwa : 739
Czy w skrypcie ogrpg-db masz swoje, poprawne dane do bazy MySQL?
Czy inne skrypty wykorzystuj?ce MySQL dzia?aj? bez problemu?
Wysłany: 2018-09-10, 19:46
CinusPL
Wiek: 26 Na forum: 2832 dni Posty: 20
Nick w MP: CinusPL
"Wilq" napisał/a :Czy w skrypcie ogrpg-db masz swoje, poprawne dane do bazy MySQL?
Czy inne skrypty wykorzystuj?ce MySQL dzia?aj? bez problemu?
W DB2 I ORGP-DB mam moje dane i sa dobrze, dziala poprawnie logowanie np.
[ Dodano : 2018-09-11, 17:16 ]
"Wilq" napisał/a :Czy w skrypcie ogrpg-db masz swoje, poprawne dane do bazy MySQL?
Czy inne skrypty wykorzystuj?ce MySQL dzia?aj? bez problemu?
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 getElementData ( plr , "Ryjek" ) then return true end
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 getElementData ( plr , "Ryjek" ) then return 4 end
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 ] = "CEO" ,
[ 3 ] = "RCON" ,
[ 2 ] = "ADMINISTRATOR" ,
[ 1 ] = "MODERATOR" ,
}
function wyswietl ( plr , tabela )
if not plr then return end
if type ( tabela ) ~= "table" then outputChatBox ( "* Brak administracji ..." , plr , 255 , 0 , 0 ) return end
outputChatBox ( "----Dost?pna Administracja----" , plr )
for _ , s in pairs ( tabela ) do
outputChatBox ( getPlayerName ( s [ 1 ]): gsub ( "#%x%x%x%x%x%x" , "" ).. "(" .. getElementData ( s [ 1 ], "id" ).. ")" .. " [RANGA : " .. s [ 2 ]: gsub ( "#%x%x%x%x%x%x" , "" ).. " ]" , plr , 180 , 30 , 0 , true )
end
outputChatBox ( "----------------" , plr )
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 ( "alladmins" , cmd_alladmins , false , false )
addCommandHandler ( "admins" , cmd_admins , false , false )
addEvent ( "admin:logs" , true )
addEventHandler ( "admin:logs" , root , function( text )
local query = exports [ "ogrpg-db" ]: dbSet ( "INSERT INTO ogrpg_logs (name,data) VALUES (?,NOW())" , text )
end )
addCommandHandler ( "ucho" , function( plr , cmd )
if getAdmin ( plr , 4 ) or getAdmin ( plr , 3 ) or getAdmin ( plr , 2 ) or getAdmin ( plr , 1 ) then
local x = getElementData ( plr , "player:ucho" )
setElementData ( plr , "player:ucho" , not x )
end
end )
addCommandHandler ( "duty" , function( plr , cmd )
if 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" , 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 )
end
setElementData ( plr , "player:admin" , true )
outputChatBox ( "* Zalogowa?e?(a?) si? na slu?be (/admins)." , plr )
outputChatBox ( "* Wpisz /konsola by wyswietlic twoj interfejs." , plr , 192 , 192 , 192 )
local text = "* " .. getPlayerName ( plr ).. " zalogowa?(a) si? do administracji." .. RGBToHex ( 255 , 255 , 255 )
triggerEvent ( "admin:addText" , resourceRoot , text , math . random ( 0 , 99 ))
-- outputChatBox (, root , 255 , 0 , 0 )
local rank = getVisualRank ( plr )
if rank then
setElementData ( plr , "player:level" ,{ tonumber ( getLevel ( plr )), rank })
return
end
if getAdmin ( plr , 1 ) then
setPlayerName ( plr , "#01bf34" .. getPlayerName ( plr ))
elseif getAdmin ( plr , 2 ) then
setPlayerName ( plr , "#ff0000" .. getPlayerName ( plr ))
elseif getAdmin ( plr , 3 ) then
setPlayerName ( plr , "#a31303" .. getPlayerName ( plr ))
elseif getAdmin ( plr , 4 ) then
setPlayerName ( plr , "#4060e0" .. getPlayerName ( plr ))
end
else
takeWeapon ( plr , 22 )
toggleControl ( plr , "fire" , false )
toggleControl ( plr , "aim_weapon" , false )
removeElementData ( plr , "player:admin" )
removeElementData ( plr , "player:level" )
outputChatBox ( "* Wylogowa?e?(a?) si? z slu?by (/admins)." , plr )
setPlayerName ( plr , getPlayerName ( plr ): gsub ( "#%x%x%x%x%x%x" , "" ))
local text = "* " .. getPlayerName ( plr ).. " wylogowa?(a) si? z administracji." .. RGBToHex ( 255 , 255 , 255 )
triggerEvent ( "admin:addText" , resourceRoot , text , math . random ( 0 , 99 ))
-- outputChatBox (, root , 255 , 0 , 0 )
end
else
-- outputChatBox ( "* Nie posiadasz uprawnie?." , plr , 255 , 0 , 0 )
end
end )
scianarapsow = createObject ( 16637 ,- 1931.6 , 883.27 , 35.41 )
setObjectScale ( scianarapsow , 3 )
reportView = {{ "Sciana Raportow" , 0 }}
setElementData ( scianarapsow , "sciana:raportow" , reportView )
addEvent ( "admin:addReport" , true )
addEventHandler ( "admin:addReport" , root , function( text , id )
table . insert ( reportView , { text , id })
if #reportView > 10 then
table . remove ( reportView , 2 )
end
setElementData ( scianarapsow , "sciana:raportow" , reportView )
end )
addEvent ( "admin:removeReport" , true )
addEventHandler ( "admin:removeReport" , root , function( id )
for i = #reportView, 2, -1 do
if reportView [ i ][ 2 ] == id then
table . remove ( reportView , i )
end
end
setElementData ( scianarapsow , "sciana:raportow" , reportView )
end )
scianatext = createObject ( 981 , 0 , 0 , 0 )
textView = {{ "LOGI SERWEROWE" , 0 }}
setElementData ( scianatext , "sciana:text" , textView )
addEvent ( "admin:addText" , true )
addEventHandler ( "admin:addText" , root , function( text , id )
table . insert ( textView , { text , id })
if #textView > 10 then
table . remove ( textView , 2 )
end
setElementData ( scianatext , "sciana:text" , textView )
end )
addEvent ( "admin:removeText" , true )
addEventHandler ( "admin:removeText" , root , function( id )
for i = #textView, 2, -1 do
if textView [ i ][ 2 ] == id then
table . remove ( textView , i )
end
end
setElementData ( scianatext , "sciana:text" , textView )
end )
addCommandHandler ( "report" , function( plr , cmd , cel ,...)
if not cel then
outputChatBox ( "* U?yj: /report <nick/ID> <pow?d>" , plr )
return
end
local target = exports [ "ogrpg-core" ]: findPlayer ( plr , cel )
if not target then
outputChatBox ( "* Nie znaleziono podanego gracza." , plr , 255 , 0 , 0 )
return
end
local text = table . concat ({...}, " " )
desc = getPlayerName ( plr ): gsub ( "#%x%x%x%x%x%x" , "" ).. "(" .. getElementData ( plr , "id" ).. ") >> " .. getPlayerName ( target ): gsub ( "#%x%x%x%x%x%x" , "" ).. "(" .. getElementData ( target , "id" ).. "): " .. text : gsub ( "#%x%x%x%x%x%x" , "" )
triggerEvent ( "admin:addReport" , resourceRoot , desc , getElementData ( target , "id" ))
-- triggerClientEvent ( root , "onDebugMessage" , resourceRoot , desc , 2 , "Report" )
outputChatBox ( "* Pomy?lnie wys?ano zg?oszenie na gracza: " .. getPlayerName ( target ): gsub ( "#%x%x%x%x%x%x" , "" ), plr )
end )
addCommandHandler ( "cl" , function( plr , cmd , id ,...)
if not getAdmin ( plr ) then
outputChatBox ( "* Nie posiadasz uprawnie?." , plr , 255 , 0 , 0 )
return
end
local reason = table . concat ({...}, " " )
local target = exports [ "ogrpg-core" ]: findPlayer ( plr , id )
opis = "Brak Online"
if target then
id = getElementData ( target , "id" )
opis = getPlayerName ( target )
if target ~= plr and not getAdmin ( target ) then
exports [ "ogrpg-db" ]: dbSet ( "INSERT INTO raps (nick,uid,ostatnio_zrobil) VALUES (?,?,NOW())" , getPlayerName ( plr ): gsub ( "#%x%x%x%x%x%x" , "" ), getElementData ( plr , "player:uid" ))
end
end
for i , v in ipairs ( getElementsByType ( "player" )) do
if getAdmin ( v ) then
-- if getElementData ( v , "player:admin" ) then
triggerEvent ( "admin:removeReport" , resourceRoot , id )
outputChatBox ( "* " .. getPlayerName ( plr ): gsub ( "#%x%x%x%x%x%x" , "" ).. " usun??/??a raport na: " .. opis : gsub ( "#%x%x%x%x%x%x" , "" ).. "/" .. id .. ": " .. reason , v , 255 , 0 , 0 )
-- end
end
end
end )
addCommandHandler ( "rapsy" , function( plr , cmd , uid )
if not getAdmin ( plr ) then
outputChatBox ( "* Nie posiadasz uprawnie?." , plr , 255 , 255 , 255 )
return
end
if not uid then outputChatBox ( "U?ycie: /rapsy <uid>" , plr , 255 , 255 , 255 ) return end
local sel = exports [ "ogrpg-db" ]: dbGet ( "SELECT * FROM raps WHERE uid=?" , getElementData ( plr , "player:uid" ))
if sel and #sel > 0 then
outputChatBox ( "U?ytkownik o uid " .. uid .. " wykona? " .. #sel.." report?w.", plr, 255, 255, 255)
else
outputChatBox ( "U?ytkownik o uid " .. uid .. " wykona? 0 report?w." , plr , 255 , 255 , 255 )
end
end )
local x , y , z = - 6716.17 , - 1342.35 , 97.75
local obj = createObject ( 1228 , x , y , z - 0.65 )
triggerClientEvent ( "setBreakable" , root , obj )
setElementFrozen ( obj , true )
local x , y , z = - 6716.17 , - 1338.40 , 97.75
local obj = createObject ( 1228 , x , y , z - 0.65 )
triggerClientEvent ( "setBreakable" , root , obj )
setElementFrozen ( obj , true )
local x , y , z = - 6716.17 , - 1334.33 , 97.75
local obj = createObject ( 1228 , x , y , z - 0.65 )
triggerClientEvent ( "setBreakable" , root , obj )
setElementFrozen ( obj , true )
local x , y , z = - 6716.17 , - 1330.37 , 97.75
local obj = createObject ( 1228 , x , y , z - 0.65 )
triggerClientEvent ( "setBreakable" , root , obj )
setElementFrozen ( obj , true )
local x , y , z = - 6721.07 , - 1328.51 , 97.75
local obj = createObject ( 1228 , x , y , z - 0.65 )
triggerClientEvent ( "setBreakable" , root , obj )
setElementFrozen ( obj , true )
local x , y , z = - 6721.07 , - 1332.64 , 97.75
local obj = createObject ( 1228 , x , y , z - 0.65 )
triggerClientEvent ( "setBreakable" , root , obj )
setElementFrozen ( obj , true )
local x , y , z = - 6721.14 , - 1336.55 , 97.75
local obj = createObject ( 1228 , x , y , z - 0.65 )
triggerClientEvent ( "setBreakable" , root , obj )
setElementFrozen ( obj , true )
local x , y , z = - 6721.14 , - 1340.55 , 97.75
local obj = createObject ( 1228 , x , y , z - 0.65 )
triggerClientEvent ( "setBreakable" , root , obj )
setElementFrozen ( obj , true )
Oto kod pliku w duty admins gdzie jest komenda /admins bo mia?em tutaj wstawic. to jak mam sobie dac admina aby pojawil sie w ogrpg-admins w bazie danych?
Tagi: its :: your :: world :: debugscript :: błedy
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: