Wysłany: 2017-01-18, 22:01
SamsungPLL
Programista lodówek
Wiek: 23 Na forum: 3805 dni Posty: 123
Nick w MP: SamsungPLL
Piwa : 135
Witam, znalaz?em na komputerze skrypt na tab na serwerze, podobno z ourgame. Noi odpali?em sobie ten skrypt i on nie dzia?a?, sprawdza?em czy w mecie s? wszystkie pliki prawid?owo w nazwie ustawione i w lua tam troche popatrzy?em ale nie umiem jako? dobrze lua wi?c nie znalaz?em ?adnego b??du. Ale pomy?la?em te? ze mo?e skrypt trzeba podpi?? pod MYSQL ale nie wiem wi?c czekam na pomoc od was
Link do skryptu: -
[ Dodano : 2017-01-18, 22:06 ]
@Skrypt si? w??cza po wpisaniu komendy /start tab ale gdy wciskam klawisz TAB to wyskakuje mi default tab
Ostatnio zmieniony przez SamsungPLL 2017-01-19, 13:39, w całości zmieniany 1 raz
Więcej szczegółów
Wystawiono 1 piw(a):Andrzej22
Wysłany: 2017-01-18, 23:17
_Haze
Peace Yo!
Wiek: 24 Na forum: 4184 dni Posty: 1648
Nick w MP: Haze
Piwa : 2628
SamsungPLL , podaj db i kod
Wysłany: 2017-01-19, 08:55
AssasiPlayGames
Wiek: 22 Na forum: 3757 dni Posty: 176
Nick w MP: NiFeKpL
Piwa : 909
Wysłany: 2017-01-19, 12:48
freadyy
uff ya
Wiek: 26 Na forum: 3437 dni Posty: 33
Piwa : 5
Usu? warunek kt?ry sprawdza czy gracz jest zalogowany czy nie i jednego enda, pewnie nie u?ywasz logowania z ourGame v2.
( To usu? z kodu ):
if getElementData ( localPlayer , 'player:logged' ) then
Wysłany: 2017-01-19, 13:02
SamsungPLL
Programista lodówek
Wiek: 23 Na forum: 3805 dni Posty: 123
Nick w MP: SamsungPLL
Piwa : 135
AssasiPlayGames , dalej nie dzia?a, wpisa?em /start tab to si? w??cza ale jak wciskam klawisz TAB to jest normalny (default) tab.
------------------------------------------------
Hazmudex , prosz? kod
-- ustawienia
local scoreboard = {
toggled = nil ,
font = nil ,
selectedRow = nil ,
visibleRows = nil ,
}
ping = {}
-- skala
local zoom = 1.0 -- rozmiar xGUI
local baseX = 1920 -- width GUI
local minZoom = 2 -- minisize GUI
local screenW , screenH = guiGetScreenSize ()
if screenW < baseX then
zoom = math . min ( minZoom , baseX / screenW )
end
-- funkcje Z4SS
addEventHandler ( 'onClientRender' , root , function()
if scoreboard . toggled then
dxDrawImage ( screenW - 1360 / zoom , 240 / zoom , 800 / zoom , 600 / zoom , 'i/scoreboard_bg.png' , 0 , 0 , 0 , tocolor ( 255 , 255 , 255 , 255 ), false )
local n = 0
if getKeyState ( "tab" ) == false then
scoreboard . toggled = nil
if scoreboard . font then
destroyElement ( scoreboard . font )
scoreboard . font = nil
end
scoreboard . selectedRow = nil
scoreboard . visibleRows = nil
end
for k , v in pairs ( getElementsByType ( 'player' )) do
if k >= scoreboard . selectedRow and k <= scoreboard . visibleRows then
n = n + 1
local id = getElementData ( v , 'p:id' ) or '?'
local uid = getElementData ( v , 'p:uid' ) or '?'
local name = getPlayerName ( v )
local reputation = getElementData ( v , 'p:reputation' ) or '?'
-- start - check duty
local duty = getElementData ( v , 'p:duty' )
if duty then
if duty . active then
faction = duty . name .. " ✓"
else
faction = duty . name .. " X"
end
else
faction = "X"
end
-- stop - check duty
-- start - odswiez - refresh - ping
if not ( ping [ v ]) then
ping [ v ] = {}
ping [ v ]. text = getPlayerPing ( v )
ping [ v ]. time = getTickCount ( )
elseif getTickCount ( )- ping [ v ]. time > 1000 then
ping [ v ]. text = getPlayerPing ( v )
ping [ v ]. time = getTickCount ( )
end
-- stop - odswiez - refresh - ping
-- start - check premium status
local color = { 255 , 255 , 255 }
if getElementData ( v , 'p:premium' ) then
color = { 255 , 215 , 0 }
end
-- stop - check premium status
local offsetY = ( 47 / zoom )*( n - 1 )
dxDrawImage ( screenW - 1285 / zoom , 393 / zoom + offsetY , 650 / zoom , 44 / zoom , 'i/scoreboard_row.png' , 0 , 0 , 0 , tocolor ( 255 , 255 , 255 , 255 ), false )
dxDrawText ( id , screenW - 1285 / zoom , 393 / zoom + offsetY , screenW - 1228 / zoom , 437 / zoom + offsetY , tocolor ( 255 , 255 , 255 , 255 ), 1.00 , scoreboard . font , 'center' , 'center' , false , true )
dxDrawText ( uid , screenW - 1228 / zoom , 393 / zoom + offsetY , screenW - 1116 / zoom , 437 / zoom + offsetY , tocolor ( 255 , 255 , 255 , 255 ), 1.00 , scoreboard . font , 'center' , 'center' , false , true )
dxDrawText ( name , screenW - 1116 / zoom , 393 / zoom + offsetY , screenW - 951 / zoom , 437 / zoom + offsetY , tocolor ( color [ 1 ], color [ 2 ], color [ 3 ], 255 ), 1.00 , scoreboard . font , 'center' , 'center' , false , true )
dxDrawText ( reputation , screenW - 951 / zoom , 393 / zoom + offsetY , screenW - 815 / zoom , 437 / zoom + offsetY , tocolor ( 255 , 255 , 255 , 255 ), 1.00 , scoreboard . font , 'center' , 'center' , false , true )
dxDrawText ( faction , screenW - 815 / zoom , 393 / zoom + offsetY , screenW - 715 / zoom , 437 / zoom + offsetY , tocolor ( 255 , 255 , 255 , 255 ), 1.00 , scoreboard . font , 'center' , 'center' , false , true )
dxDrawText ( ping [ v ]. text .. ' ms' , screenW - 715 / zoom , 393 / zoom + offsetY , screenW - 635 / zoom , 437 / zoom + offsetY , tocolor ( 255 , 255 , 255 , 255 ), 1.00 , scoreboard . font , 'center' , 'center' , false , true )
end
end
end
end )
addEventHandler ( 'onClientKey' , root , function( key , press )
if not scoreboard . toggled then return end
if key == "mouse_wheel_up" then
if scoreboard . selectedRow ~= 1 then
scoreboard . selectedRow = scoreboard . selectedRow - 1
scoreboard . visibleRows = scoreboard . visibleRows - 1
end
elseif key == "mouse_wheel_down" then
if scoreboard . visibleRows < #getElementsByType('player') then
scoreboard . selectedRow = scoreboard . selectedRow + 1
scoreboard . visibleRows = scoreboard . visibleRows + 1
end
end
end )
bindKey ( 'TAB' , 'both' , function()
if getElementData ( localPlayer , 'p:logged' ) then
if not scoreboard . toggled then
scoreboard . toggled = true
if not scoreboard . font then
scoreboard . font = dxCreateFont ( 'f/font.ttf' , 12 / zoom ) or 'default-bold'
end
scoreboard . selectedRow = 1
scoreboard . visibleRows = 8
else
scoreboard . toggled = nil
if scoreboard . font then
destroyElement ( scoreboard . font )
scoreboard . font = nil
end
scoreboard . selectedRow = nil
scoreboard . visibleRows = nil
end
end
end )
Podpis
1000 DNI NA FORUM: 28.09.2018r.
100 POSTÓW NA FORUM: 01.12.2017r.
Wysłany: 2017-01-19, 13:07
_Haze
Peace Yo!
Wiek: 24 Na forum: 4184 dni Posty: 1648
Nick w MP: Haze
Piwa : 2628
SamsungPLL , a masz element date getElementData(localPlayer, 'p:logged') ? Jak nie to usu? t? linijke i enda. Sprawd? te? /debugscript 3 czy przy w??czaniu skryptu s? jakie? errory.
Wysłany: 2017-01-19, 13:22
freadyy
uff ya
Wiek: 26 Na forum: 3437 dni Posty: 33
Piwa : 5
Je?eli nie chcesz mie? standardowego scoreboarda wpisz ./stop scoreboard a ten z og daj pod inn? nazwa i zr?b to co Ci m?wimy i powinno dzia?a?.
Wysłany: 2017-01-19, 13:39
SamsungPLL
Programista lodówek
Wiek: 23 Na forum: 3805 dni Posty: 123
Nick w MP: SamsungPLL
Piwa : 135
Dzia?a!!! Dzi?kuje wam ale mam jeszcze pytania
Za co odpowiada?a ta funkcja getElementData(localPlayer, 'p:logged') ?
i w debugscript wyskakuje mi error, za kazdym razem gdy wcisn? klawisz tab wyskakuje ten jeden error
Podpis
1000 DNI NA FORUM: 28.09.2018r.
100 POSTÓW NA FORUM: 01.12.2017r.
Wysłany: 2017-01-19, 13:59
freadyy
uff ya
Wiek: 26 Na forum: 3437 dni Posty: 33
Piwa : 5
Ten warunek sprawdza czy gracz jest zalogowany, jak tak to pokaze okienko czy co tam a je?eli nie to nie zrobi tego. Licz? na piffko ;-)
Wysłany: 2017-01-19, 14:08
SamsungPLL
Programista lodówek
Wiek: 23 Na forum: 3805 dni Posty: 123
Nick w MP: SamsungPLL
Piwa : 135
W debugscript wyskakuje mi error, za ka?dym razem gdy wcisn? klawisz tab wyskakuje ten jeden error
Je?eli z tym pomo?esz to mo?esz liczy? na piwko
Podpis
1000 DNI NA FORUM: 28.09.2018r.
100 POSTÓW NA FORUM: 01.12.2017r.
Wysłany: 2017-01-19, 14:11
freadyy
uff ya
Wiek: 26 Na forum: 3437 dni Posty: 33
Piwa : 5
"SamsungPLL" napisał/a :W debugscript wyskakuje mi error, za ka?dym razem gdy wcisn? klawisz tab wyskakuje ten jeden error
Obrazek
Je?eli z tym pomo?esz to mo?esz liczy? na piwko
Podaj kod kt?ry teraz masz.
Wysłany: 2017-01-19, 14:24
SamsungPLL
Programista lodówek
Wiek: 23 Na forum: 3805 dni Posty: 123
Nick w MP: SamsungPLL
Piwa : 135
freadyy , prosz?
-- ustawienia
local scoreboard = {
toggled = nil ,
font = nil ,
selectedRow = nil ,
visibleRows = nil ,
}
ping = {}
-- skala
local zoom = 2.0 -- rozmiar xGUI
local baseX = 1920 -- width GUI
local minZoom = 3 -- minisize GUI
local screenW , screenH = guiGetScreenSize ()
if screenW < baseX then
zoom = math . min ( minZoom , baseX / screenW )
end
-- funkcje Z4SS
addEventHandler ( 'onClientRender' , root , function()
if scoreboard . toggled then
dxDrawImage ( screenW - 1360 / zoom , 240 / zoom , 800 / zoom , 600 / zoom , 'i/scoreboard_bg.png' , 0 , 0 , 0 , tocolor ( 255 , 255 , 255 , 255 ), false )
local n = 0
if getKeyState ( "tab" ) == false then
scoreboard . toggled = nil
if scoreboard . font then
destroyElement ( scoreboard . font )
scoreboard . font = nil
end
scoreboard . selectedRow = nil
scoreboard . visibleRows = nil
end
for k , v in pairs ( getElementsByType ( 'player' )) do
if k >= scoreboard . selectedRow and k <= scoreboard . visibleRows then
n = n + 1
local id = getElementData ( v , 'id' ) or '?'
local uid = getElementData ( v , 'player:uid' ) or '?'
local name = getPlayerName ( v )
local reputation = getElementData ( v , 'player:reputation' ) or '?'
-- start - check duty
local duty = getElementData ( v , 'player:duty' )
if duty then
if duty . active then
faction = duty . name .. " ✓"
else
faction = duty . name .. " X"
end
else
faction = "X"
end
-- stop - check duty
-- start - odswiez - refresh - ping
if not ( ping [ v ]) then
ping [ v ] = {}
ping [ v ]. text = getPlayerPing ( v )
ping [ v ]. time = getTickCount ( )
elseif getTickCount ( )- ping [ v ]. time > 1000 then
ping [ v ]. text = getPlayerPing ( v )
ping [ v ]. time = getTickCount ( )
end
-- stop - odswiez - refresh - ping
-- start - check premium status
local color = { 255 , 255 , 255 }
if getElementData ( v , 'player:premium' ) then
color = { 255 , 215 , 0 }
end
-- stop - check premium status
local offsetY = ( 47 / zoom )*( n - 1 )
dxDrawImage ( screenW - 1285 / zoom , 393 / zoom + offsetY , 650 / zoom , 44 / zoom , 'i/scoreboard_row.png' , 0 , 0 , 0 , tocolor ( 255 , 255 , 255 , 255 ), false )
dxDrawText ( id , screenW - 1285 / zoom , 393 / zoom + offsetY , screenW - 1228 / zoom , 437 / zoom + offsetY , tocolor ( 255 , 255 , 255 , 255 ), 1.00 , scoreboard . font , 'center' , 'center' , false , true )
dxDrawText ( uid , screenW - 1228 / zoom , 393 / zoom + offsetY , screenW - 1116 / zoom , 437 / zoom + offsetY , tocolor ( 255 , 255 , 255 , 255 ), 1.00 , scoreboard . font , 'center' , 'center' , false , true )
dxDrawText ( name , screenW - 1116 / zoom , 393 / zoom + offsetY , screenW - 951 / zoom , 437 / zoom + offsetY , tocolor ( color [ 1 ], color [ 2 ], color [ 3 ], 255 ), 1.00 , scoreboard . font , 'center' , 'center' , false , true )
dxDrawText ( reputation , screenW - 951 / zoom , 393 / zoom + offsetY , screenW - 815 / zoom , 437 / zoom + offsetY , tocolor ( 255 , 255 , 255 , 255 ), 1.00 , scoreboard . font , 'center' , 'center' , false , true )
dxDrawText ( faction , screenW - 815 / zoom , 393 / zoom + offsetY , screenW - 715 / zoom , 437 / zoom + offsetY , tocolor ( 255 , 255 , 255 , 255 ), 1.00 , scoreboard . font , 'center' , 'center' , false , true )
dxDrawText ( ping [ v ]. text .. ' ms' , screenW - 715 / zoom , 393 / zoom + offsetY , screenW - 635 / zoom , 437 / zoom + offsetY , tocolor ( 255 , 255 , 255 , 255 ), 1.00 , scoreboard . font , 'center' , 'center' , false , true )
end
end
end
end )
addEventHandler ( 'onClientKey' , root , function( key , press )
if not scoreboard . toggled then return end
if key == "mouse_wheel_up" then
if scoreboard . selectedRow ~= 1 then
scoreboard . selectedRow = scoreboard . selectedRow - 1
scoreboard . visibleRows = scoreboard . visibleRows - 1
end
elseif key == "mouse_wheel_down" then
if scoreboard . visibleRows < #getElementsByType('player') then
scoreboard . selectedRow = scoreboard . selectedRow + 1
scoreboard . visibleRows = scoreboard . visibleRows + 1
end
end
end )
bindKey ( 'TAB' , 'both' , function()
if not scoreboard . toggled then
scoreboard . toggled = true
if not scoreboard . font then
scoreboard . font = dxCreateFont ( 'f/font.ttf' , 12 / zoom ) or 'default-bold'
scoreboard . selectedRow = 1
scoreboard . visibleRows = 8
else
scoreboard . toggled = nil
if scoreboard . font then
destroyElement ( scoreboard . font )
scoreboard . font = nil
end
scoreboard . selectedRow = nil
scoreboard . visibleRows = nil
end
end
end )
Podpis
1000 DNI NA FORUM: 28.09.2018r.
100 POSTÓW NA FORUM: 01.12.2017r.
Wysłany: 2017-01-19, 14:28
freadyy
uff ya
Wiek: 26 Na forum: 3437 dni Posty: 33
Piwa : 5
local scoreboard = {
toggled = nil ,
font = nil ,
selectedRow = nil ,
visibleRows = nil ,
}
ping = {}
-- scale
local zoom = 1.0 -- size GUI
local baseX = 1920 -- width GUI
local minZoom = 2 -- minisize GUI
local screenW , screenH = guiGetScreenSize ()
if screenW < baseX then
zoom = math . min ( minZoom , baseX / screenW )
end
-- functions
addEventHandler ( 'onClientRender' , root , function()
if scoreboard . toggled then
dxDrawImage ( screenW - 1360 / zoom , 240 / zoom , 800 / zoom , 600 / zoom , 'i/scoreboard_bg.png' , 0 , 0 , 0 , tocolor ( 255 , 255 , 255 , 255 ), false )
local n = 0
if getKeyState ( "tab" ) == false then
scoreboard . toggled = nil
if scoreboard . font then
destroyElement ( scoreboard . font )
scoreboard . font = nil
end
scoreboard . selectedRow = nil
scoreboard . visibleRows = nil
end
for k , v in pairs ( getElementsByType ( 'player' )) do
if k >= scoreboard . selectedRow and k <= scoreboard . visibleRows then
n = n + 1
local id = getElementData ( v , 'player:id' ) or '?'
local uid = getElementData ( v , 'player:uid' ) or '?'
local name = getPlayerName ( v )
local reputation = getElementData ( v , 'player:reputation' ) or '?'
-- start - check duty
local duty = getElementData ( v , 'player:duty' )
if duty then
if duty . active then
faction = duty . name .. " ✓"
else
faction = duty . name .. " X"
end
else
faction = "X"
end
-- stop - check duty
-- start - refresh ping
if not ( ping [ v ]) then
ping [ v ] = {}
ping [ v ]. text = getPlayerPing ( v )
ping [ v ]. time = getTickCount ( )
elseif getTickCount ( )- ping [ v ]. time > 1000 then
ping [ v ]. text = getPlayerPing ( v )
ping [ v ]. time = getTickCount ( )
end
-- stop - refresh ping
-- start - check premium status
local color = { 255 , 255 , 255 }
if getElementData ( v , 'player:premium' ) then
color = { 255 , 215 , 0 }
end
-- stop - check premium status
local offsetY = ( 47 / zoom )*( n - 1 )
dxDrawImage ( screenW - 1285 / zoom , 393 / zoom + offsetY , 650 / zoom , 44 / zoom , 'i/scoreboard_row.png' , 0 , 0 , 0 , tocolor ( 255 , 255 , 255 , 255 ), false )
dxDrawText ( id , screenW - 1285 / zoom , 393 / zoom + offsetY , screenW - 1228 / zoom , 437 / zoom + offsetY , tocolor ( 255 , 255 , 255 , 255 ), 1.00 , scoreboard . font , 'center' , 'center' , false , true )
dxDrawText ( uid , screenW - 1228 / zoom , 393 / zoom + offsetY , screenW - 1116 / zoom , 437 / zoom + offsetY , tocolor ( 255 , 255 , 255 , 255 ), 1.00 , scoreboard . font , 'center' , 'center' , false , true )
dxDrawText ( name , screenW - 1116 / zoom , 393 / zoom + offsetY , screenW - 951 / zoom , 437 / zoom + offsetY , tocolor ( color [ 1 ], color [ 2 ], color [ 3 ], 255 ), 1.00 , scoreboard . font , 'center' , 'center' , false , true )
dxDrawText ( reputation , screenW - 951 / zoom , 393 / zoom + offsetY , screenW - 815 / zoom , 437 / zoom + offsetY , tocolor ( 255 , 255 , 255 , 255 ), 1.00 , scoreboard . font , 'center' , 'center' , false , true )
dxDrawText ( faction , screenW - 815 / zoom , 393 / zoom + offsetY , screenW - 715 / zoom , 437 / zoom + offsetY , tocolor ( 255 , 255 , 255 , 255 ), 1.00 , scoreboard . font , 'center' , 'center' , false , true )
dxDrawText ( ping [ v ]. text .. ' ms' , screenW - 715 / zoom , 393 / zoom + offsetY , screenW - 635 / zoom , 437 / zoom + offsetY , tocolor ( 255 , 255 , 255 , 255 ), 1.00 , scoreboard . font , 'center' , 'center' , false , true )
end
end
end
end )
addEventHandler ( 'onClientKey' , root , function( key , press )
if not scoreboard . toggled then return end
if key == "mouse_wheel_up" then
if scoreboard . selectedRow ~= 1 then
scoreboard . selectedRow = scoreboard . selectedRow - 1
scoreboard . visibleRows = scoreboard . visibleRows - 1
end
elseif key == "mouse_wheel_down" then
if scoreboard . visibleRows < #getElementsByType('player') then
scoreboard . selectedRow = scoreboard . selectedRow + 1
scoreboard . visibleRows = scoreboard . visibleRows + 1
end
end
end )
bindKey ( 'TAB' , 'both' , function()
if not scoreboard . toggled then
scoreboard . toggled = true
if not scoreboard . font then
scoreboard . font = dxCreateFont ( 'f/font.ttf' , 12 / zoom ) or 'default-bold'
end
scoreboard . selectedRow = 1
scoreboard . visibleRows = 8
else
scoreboard . toggled = nil
if scoreboard . font then
destroyElement ( scoreboard . font )
scoreboard . font = nil
end
scoreboard . selectedRow = nil
scoreboard . visibleRows = nil
end
end )
Spr?buj to, przerobi?em oryginaln? wersje. Wi?c je?eli tam jakie? mia?e? zmiany to sobie je dodaj.
Tagi: og- :: tab
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: