Wysłany: 2019-02-18, 02:59
smigi
Wiek: 23 Na forum: 3367 dni Posty: 60
Nick w MP: smigi
Piwa : 2
witam jak podpi?c taba z memoris do pysa nie dzia?a ani frakcja ani uid pomoze ktos
kod ocal screenW , screenH = guiGetScreenSize ()
local sx , sy = guiGetScreenSize ()
local zoom = 2
local fh = 2020
if sx < fh then
zoom = math . min ( 2 , fh / sx )
end
-- tego nie ruszaj
local k = 1
local n = 19
local score = false
local font = dxCreateFont ( "font.ttf" , 9 )
local ping = {}
local logo = false -- wylaczanie / wlaczanie loga w scoreboardzie
function dxDrawShadowText ( text , x , y , w , h , color , size , font , x1 , x2 )
dxDrawText ( string . gsub ( text , "#%x%x%x%x%x%x" , "" ), x + 1 , y + 1 , w + 1 , h + 1 , tocolor ( 0 , 0 , 0 ), size , font , x1 , x2 , false , false , false , false , false )
dxDrawText ( text , x , y , w , h , color , size , font , x1 , x2 , false , false , false , true , false )
end
addEventHandler ( "onClientRender" , root , function()
score = getKeyState ( "tab" )
local gracze = getElementsByType ( "player" )
if score ~= true then return end
-- werjsa z logiem
if logo == true then
dxDrawRectangle ( screenW * 0.3250 , screenH * 0.2120 , screenW * 0.3505 , screenH * 0.5759 , tocolor ( 0 , 0 , 0 , 200 ), false )
dxDrawImage ( screenW * 0.3729 , screenH * 0.2194 , screenW * 0.2562 , screenH * 0.09 , "logo.png" , 0 , 0 , 0 , tocolor ( 255 , 255 , 255 , 255 ), false )
else -- wersja bez loga
dxDrawImage ( 65 , 250 , 1920 / zoom , 780 / zoom , ":MR-scoreboard/tab.png" , 0 , 0 , 0 , tocolor ( 255 , 255 , 255 , 255 ), false )
end
local x = 0
for i , v in ipairs ( gracze ) do
if i >= k and i <= n then
x = x + 1
if not ping [ v ] then
ping [ v ] = {}
ping [ v ][ "ms" ] = getPlayerPing ( v )
ping [ v ][ "time" ] = getTickCount ()
elseif getTickCount ()- ping [ v ][ "time" ] > 1500 then
ping [ v ][ "ms" ] = getPlayerPing ( v )
ping [ v ][ "time" ] = getTickCount ()
end
local id = getElementData ( v , "id" )
local uid = getElementData ( v , "player:uid" )
local org = getElementData ( v , "player:organization" )
local frakcja = getElementData ( v , "player:duty" )
local offsetY = ( screenH * 0.03600 )*( x - 1 )
local isPremium = getElementData ( v , "player:premium" )
local ranga = getElementData ( v , "player:level" )
if not ranga and not isPremium then dxDrawText ( getPlayerName ( v ), ( 722 + 29 )/ zoom , 204 / zoom + offsetY , 767 / zoom , 222 / zoom + offsetY , tocolor ( 255 , 255 , 255 , 255 ), 1.40 , "default" , "left" , "top" , false , false , false , true ) end
if isPremium and not ranga then dxDrawText ( getPlayerName ( v ), ( 722 + 29 )/ zoom , 204 / zoom + offsetY , 767 / zoom , 222 / zoom + offsetY , tocolor ( 255 , 224 , 0 ), 1.40 , "default" , "left" , "top" , false , false , false , true ) end
if ranga == 4 then dxDrawText ( getPlayerName ( v ), ( 722 + 29 )/ zoom , 204 / zoom + offsetY , 767 / zoom , 222 / zoom + offsetY , tocolor ( 128 , 0 , 0 ), 1.40 , "default" , "left" , "top" , false , false , false , true ) end
if ranga == 3 then dxDrawText ( getPlayerName ( v ), ( 722 + 29 )/ zoom , 204 / zoom + offsetY , 767 / zoom , 222 / zoom + offsetY , tocolor ( 255 , 153 , 0 ), 1.40 , "default" , "left" , "top" , false , false , false , true ) end
if ranga == 2 then dxDrawText ( getPlayerName ( v ), ( 722 + 29 )/ zoom , 204 / zoom + offsetY , 767 / zoom , 222 / zoom + offsetY , tocolor ( 0 , 153 , 0 ), 1.40 , "default" , "left" , "top" , false , false , false , true ) end
if ranga == 1 then dxDrawText ( getPlayerName ( v ), ( 722 + 29 )/ zoom , 204 / zoom + offsetY , 767 / zoom , 222 / zoom + offsetY , tocolor ( 21 , 129 , 255 ), 1.40 , "default" , "left" , "top" , false , false , false , true ) end
dxDrawText ( getElementData ( v , "id" ) or "---" , 530 / zoom , 520 / zoom + offsetY , 521 / zoom , 227 / zoom + offsetY , tocolor ( 255 , 255 , 255 , 255 ), 1.40 , "default" , "left" , "top" , false , false , false , false , false )
dxDrawText ( getElementData ( v , "player:uid" ) or "---" , 605 / zoom , 204 / zoom + offsetY , 650 / zoom , 222 / zoom + offsetY , tocolor ( 255 , 255 , 255 , 255 ), 1.40 , "default" , "left" , "top" , false , false , false , false , false )
dxDrawText ( getElementData ( v , "player:reputation" ) or "---" , 901 / zoom , 204 / zoom + offsetY , 946 / zoom , 222 / zoom + offsetY , tocolor ( 255 , 255 , 255 , 255 ), 1.40 , "default" , "left" , "top" , false , false , false , false , false )
dxDrawText ( getElementData ( v , "player:organization" ) or "---" , 1034 / zoom , 204 / zoom + offsetY , 1079 / zoom , 222 / zoom + offsetY , tocolor ( 255 , 255 , 255 , 255 ), 1.40 , "default" , "left" , "top" , false , false , false , false , false )
dxDrawText ( getElementData ( v , "player:duty" ) or "---" , 1231 / zoom , 204 / zoom + offsetY , 1276 / zoom , 222 / zoom + offsetY , tocolor ( 255 , 255 , 255 , 255 ), 1.40 , "default" , "left" , "top" , false , false , false , false , false )
dxDrawText ( getPlayerPing ( v ), 1345 / zoom , 204 / zoom + offsetY , 1390 / zoom , 222 / zoom + offsetY , tocolor ( 255 , 255 , 255 , 255 ), 1.40 , "default" , "left" , "top" , false , false , false , false , false )
end
end
end )
bindKey ( "mouse_wheel_down" , "both" , function()
if score ~= true then return end
scrollUp ()
end )
bindKey ( "mouse_wheel_up" , "both" , function()
if score ~= true then return end
scrollDown ()
end )
function openScoreboard ()
if score == true then
score = false
else
score = true
end
end
function scrollDown ()
if n == 19 then return end
k = k - 1
n = n - 1
end
function scrollUp ()
if n > #getElementsByType("player") then return end
k = k + 1
n = n + 1
end
Wysłany: 2019-02-18, 09:18
BlueCry
ŚĆRIPTER LUJA
Wiek: 25 Na forum: 4006 dni Posty: 78
Nick w MP: BlueCry
Piwa : 2176
Powinno dzia?a?:
local screenW , screenH = guiGetScreenSize ()
local sx , sy = guiGetScreenSize ()
local zoom = 2
local fh = 2020
if sx < fh then
zoom = math . min ( 2 , fh / sx )
end
-- tego nie ruszaj
local k = 1
local n = 19
local score = false
local font = dxCreateFont ( "font.ttf" , 9 )
local ping = {}
local logo = false -- wylaczanie / wlaczanie loga w scoreboardzie
function dxDrawShadowText ( text , x , y , w , h , color , size , font , x1 , x2 )
dxDrawText ( string . gsub ( text , "#%x%x%x%x%x%x" , "" ), x + 1 , y + 1 , w + 1 , h + 1 , tocolor ( 0 , 0 , 0 ), size , font , x1 , x2 , false , false , false , false , false )
dxDrawText ( text , x , y , w , h , color , size , font , x1 , x2 , false , false , false , true , false )
end
addEventHandler ( "onClientRender" , root , function()
score = getKeyState ( "tab" )
local gracze = getElementsByType ( "player" )
if score ~= true then return end
-- werjsa z logiem
if logo == true then
dxDrawRectangle ( screenW * 0.3250 , screenH * 0.2120 , screenW * 0.3505 , screenH * 0.5759 , tocolor ( 0 , 0 , 0 , 200 ), false )
dxDrawImage ( screenW * 0.3729 , screenH * 0.2194 , screenW * 0.2562 , screenH * 0.09 , "logo.png" , 0 , 0 , 0 , tocolor ( 255 , 255 , 255 , 255 ), false )
else -- wersja bez loga
dxDrawImage ( 65 , 250 , 1920 / zoom , 780 / zoom , ":MR-scoreboard/tab.png" , 0 , 0 , 0 , tocolor ( 255 , 255 , 255 , 255 ), false )
end
local x = 0
for i , v in ipairs ( gracze ) do
if i >= k and i <= n then
x = x + 1
if not ping [ v ] then
ping [ v ] = {}
ping [ v ][ "ms" ] = getPlayerPing ( v )
ping [ v ][ "time" ] = getTickCount ()
elseif getTickCount ()- ping [ v ][ "time" ] > 1500 then
ping [ v ][ "ms" ] = getPlayerPing ( v )
ping [ v ][ "time" ] = getTickCount ()
end
local id = getElementData ( v , "id" )
local uid = getElementData ( v , "player:sid" )
local org = getElementData ( v , "player:organization" )
local frakcja = getElementData ( v , "player:faction" )
local offsetY = ( screenH * 0.03600 )*( x - 1 )
local isPremium = getElementData ( v , "player:premium" )
local ranga = getElementData ( v , "player:level" )
if not ranga and not isPremium then dxDrawText ( getPlayerName ( v ), ( 722 + 29 )/ zoom , 204 / zoom + offsetY , 767 / zoom , 222 / zoom + offsetY , tocolor ( 255 , 255 , 255 , 255 ), 1.40 , "default" , "left" , "top" , false , false , false , true ) end
if isPremium and not ranga then dxDrawText ( getPlayerName ( v ), ( 722 + 29 )/ zoom , 204 / zoom + offsetY , 767 / zoom , 222 / zoom + offsetY , tocolor ( 255 , 224 , 0 ), 1.40 , "default" , "left" , "top" , false , false , false , true ) end
if ranga == 4 then dxDrawText ( getPlayerName ( v ), ( 722 + 29 )/ zoom , 204 / zoom + offsetY , 767 / zoom , 222 / zoom + offsetY , tocolor ( 128 , 0 , 0 ), 1.40 , "default" , "left" , "top" , false , false , false , true ) end
if ranga == 3 then dxDrawText ( getPlayerName ( v ), ( 722 + 29 )/ zoom , 204 / zoom + offsetY , 767 / zoom , 222 / zoom + offsetY , tocolor ( 255 , 153 , 0 ), 1.40 , "default" , "left" , "top" , false , false , false , true ) end
if ranga == 2 then dxDrawText ( getPlayerName ( v ), ( 722 + 29 )/ zoom , 204 / zoom + offsetY , 767 / zoom , 222 / zoom + offsetY , tocolor ( 0 , 153 , 0 ), 1.40 , "default" , "left" , "top" , false , false , false , true ) end
if ranga == 1 then dxDrawText ( getPlayerName ( v ), ( 722 + 29 )/ zoom , 204 / zoom + offsetY , 767 / zoom , 222 / zoom + offsetY , tocolor ( 21 , 129 , 255 ), 1.40 , "default" , "left" , "top" , false , false , false , true ) end
dxDrawText ( getElementData ( v , "id" ) or "---" , 530 / zoom , 520 / zoom + offsetY , 521 / zoom , 227 / zoom + offsetY , tocolor ( 255 , 255 , 255 , 255 ), 1.40 , "default" , "left" , "top" , false , false , false , false , false )
dxDrawText ( getElementData ( v , "player:sid" ) or "---" , 605 / zoom , 204 / zoom + offsetY , 650 / zoom , 222 / zoom + offsetY , tocolor ( 255 , 255 , 255 , 255 ), 1.40 , "default" , "left" , "top" , false , false , false , false , false )
dxDrawText ( getElementData ( v , "player:srp" ) or "---" , 901 / zoom , 204 / zoom + offsetY , 946 / zoom , 222 / zoom + offsetY , tocolor ( 255 , 255 , 255 , 255 ), 1.40 , "default" , "left" , "top" , false , false , false , false , false )
dxDrawText ( getElementData ( v , "player:organization" ) or "---" , 1034 / zoom , 204 / zoom + offsetY , 1079 / zoom , 222 / zoom + offsetY , tocolor ( 255 , 255 , 255 , 255 ), 1.40 , "default" , "left" , "top" , false , false , false , false , false )
dxDrawText ( getElementData ( v , "player:faction" ) or "---" , 1231 / zoom , 204 / zoom + offsetY , 1276 / zoom , 222 / zoom + offsetY , tocolor ( 255 , 255 , 255 , 255 ), 1.40 , "default" , "left" , "top" , false , false , false , false , false )
dxDrawText ( getPlayerPing ( v ), 1345 / zoom , 204 / zoom + offsetY , 1390 / zoom , 222 / zoom + offsetY , tocolor ( 255 , 255 , 255 , 255 ), 1.40 , "default" , "left" , "top" , false , false , false , false , false )
end
end
end )
bindKey ( "mouse_wheel_down" , "both" , function()
if score ~= true then return end
scrollUp ()
end )
bindKey ( "mouse_wheel_up" , "both" , function()
if score ~= true then return end
scrollDown ()
end )
function openScoreboard ()
if score == true then
score = false
else
score = true
end
end
function scrollDown ()
if n == 19 then return end
k = k - 1
n = n - 1
end
function scrollUp ()
if n > #getElementsByType("player") then return end
k = k + 1
n = n + 1
end
Więcej szczegółów
Wystawiono 1 piw(a):smigi
Wysłany: 2019-02-18, 16:08
smigi
Wiek: 23 Na forum: 3367 dni Posty: 60
Nick w MP: smigi
Piwa : 2
muciu2404 , Dzi?ki dzia?a w?tek do usuni?cia i piwko leci
Tagi: memoris=pys3.0
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: