Wysłany: 2020-10-31, 12:12
Lucky!!! :)
Wiek: 20 Na forum: 2372 dni Posty: 121
Nick w MP: Lucky
Piwa : 1163
Mam taki problem. Gdy wejde na serwer to nie dzia?a mi panel f1, gdy ju? zresetuje skrypt nagle dzia?a. B??d zacz?? si? ujawnia? do?? nie dawno, po jednej edycji, nie wiem czemu... Pomo?e kto?? Daj? piwka za pomoc!!
Tutaj kod:
local sw , sh = guiGetScreenSize ()
local rw , rh = 1920 , 1080
local x , y = ( sw / rw ),( sh / rh )
local zoomx = rw / sw
local font = dxCreateFont ( "f.ttf" , 15 )
function dot ( xd ) -- fukcja odpowiadaj ? ca za przecinek w pien ? dzach
local left , num , right = string . match ( xd , '^([^%d]*%d)(%d*)(.-)$' )
return left ..( num : reverse (): gsub ( '(%d%d%d)' , '%1,' ): reverse ()).. right
end
function secondsToClock ( seconds )
seconds = seconds or 0
if seconds <= 0 then
return "00:00:00" ;
else
hours = string . format ( "%02.f" , math . floor ( seconds / 3600 ));
mins = string . format ( "%02.f" , math . floor ( seconds / 60 - ( hours * 60 )));
secs = string . format ( "%02.f" , math . floor ( seconds - hours * 3600 - mins * 60 ));
return "" .. hours .. " godziny " .. mins .. " minuty"
end
end
local pid = getElementData ( localPlayer , "player:sid" ) or "B??d"
local rp = getElementData ( localPlayer , "player:srp" ) or "0"
local bank_money = getElementData ( localPlayer , "player:bank_money" ) or "brak"
local hajs = getPlayerMoney ( localPlayer ) or "0"
local rejka = getElementData ( localPlayer , "player:registerdate" ) or "---"
local waznedo = getElementData ( localPlayer , "player:premiumdate" ) or "Brak"
local hours = secondsToClock ( 60 * tonumber ( getElementData ( localPlayer , "player:hours" )))
local hourss = getElementData ( localPlayer , "player:hours" )
local org = getElementData ( localPlayer , "player:organization" ) or "Brak"
local worker = getElementData ( localPlayer , "player:workinjob" ) or "Brak"
local a =( getElementData ( localPlayer , "player:license:pjA" )== 1 and "TAK" or "NIE" )
local b =( getElementData ( localPlayer , "player:license:pjB" )== 1 and "TAK" or "NIE" )
local c =( getElementData ( localPlayer , "player:license:pjC" )== 1 and "TAK" or "NIE" )
local l =( getElementData ( localPlayer , "player:license:pjL" )== 1 and "TAK" or "NIE" )
local premium = getElementData ( localPlayer , "player:premium" )
if premium then premium = "#d5bb44PREMIUM" else premium = "#ffffffGRACZ" end
function isMouseIn ( psx , psy , pssx , pssy , abx , aby )
if not isCursorShowing () then return end
local cx , cy = getCursorPosition ()
cx , cy = cx * sw , cy * sh
if cx >= psx and cx <= psx + pssx and cy >= psy and cy <= psy + pssy then
return true , cx , cy
else
return false
end
end
local text = ""
local info = [[
.
]]
local przewodnik = [[
.
]]
local klawiszologia = [[
.
]]
local statystki = "#FFFFFFNick:#0066ff " .. getPlayerName ( localPlayer ): gsub ( "#%x%x%x%x%x%x" , "" ).. "\n#ffffffUID:#0066ff " .. pid .. "\n#ffffffReputacja:#0066ff " .. dot ( rp ).. "\n#ffffffKonto: " .. premium .. "\n#ffffffData rejestracji:#0066ff " .. rejka .. "\n#ffffffPremium wa?ne do:#0066ff " .. waznedo .. "\n#ffffffPrzegrany czas:#0066ff " .. hours .. " (" .. dot ( hourss ).. " minut)\n#ffffffMinuty na s?u?bie:#0066ff " .. dot ( worker ).. " Minut\n#ffffffOrganizacja:#0066ff " .. org .. "\n#ffffffPrawo Jazdy: #0066ffA:#ffffff " .. a .. " #0066ffB:#ffffff " .. b .. " #0066ffC:#ffffff " .. c .. " #0066ffL:#ffffff " .. l .. ""
local tworcy = [[
..
]]
local tick = getTickCount ()
local f1XD = true
function gui ()
-- G ?? WNY PANEL
dxDrawRectangle ( x * 965 , y * 240 , x * 340 , y * 600 , tocolor ( 0 , 0 , 0 , 155 ), false )
dxDrawRectangle ( x * 963 , y * 240 , x * 2 , y * 600 , tocolor ( 0 , 102 , 255 , 255 ), false )
-- PRZYCISKI
dxDrawRectangle ( x * 743 , y * 250 , x * 2 , y * 80 , tocolor ( 0 , 102 , 255 , 255 ), false )
if not isMouseIn ( x * 740 , y * 250 , x * 190 , y * 80 ) then
dxDrawRectangle ( x * 745 , y * 250 , x * 185 , y * 80 , tocolor ( 0 , 0 , 0 , 155 ), false )
else
dxDrawRectangle ( x * 745 , y * 250 , x * 185 , y * 80 , tocolor ( 100 , 100 , 100 , 140 ), false )
end
dxDrawText ( "Strona G??wna" , x * 740 , y * 250 , x * 930 , y * 330 , tocolor ( 255 , 255 , 255 , 255 ), 1.1 / zoomx , font , "center" , "center" , false )
dxDrawRectangle ( x * 743 , y * 500 , x * 2 , y * 80 , tocolor ( 0 , 102 , 255 , 255 ), false )
if not isMouseIn ( x * 740 , y * 500 , x * 190 , y * 80 ) then
dxDrawRectangle ( x * 745 , y * 500 , x * 185 , y * 80 , tocolor ( 0 , 0 , 0 , 155 ), false )
else
dxDrawRectangle ( x * 745 , y * 500 , x * 185 , y * 80 , tocolor ( 100 , 100 , 100 , 140 ), false )
end
dxDrawText ( "Przewodnik" , x * 740 , y * 500 , x * 930 , y * 580 , tocolor ( 255 , 255 , 255 , 255 ), 1.1 / zoomx , font , "center" , "center" , false )
dxDrawRectangle ( x * 743 , y * 750 , x * 2 , y * 80 , tocolor ( 0 , 102 , 255 , 255 ), false )
if not isMouseIn ( x * 740 , y * 750 , x * 190 , y * 80 ) then
dxDrawRectangle ( x * 745 , y * 750 , x * 185 , y * 80 , tocolor ( 0 , 0 , 0 , 155 ), false )
else
dxDrawRectangle ( x * 745 , y * 750 , x * 185 , y * 80 , tocolor ( 100 , 100 , 100 , 140 ), false )
end
dxDrawText ( "Tw?rcy" , x * 740 , y * 750 , x * 930 , y * 830 , tocolor ( 255 , 255 , 255 , 255 ), 1.1 / zoomx , font , "center" , "center" , false )
dxDrawRectangle ( x * 743 , y * 625 , x * 2 , y * 80 , tocolor ( 0 , 102 , 255 , 255 ), false )
if not isMouseIn ( x * 740 , y * 625 , x * 190 , y * 80 ) then
dxDrawRectangle ( x * 745 , y * 625 , x * 185 , y * 80 , tocolor ( 0 , 0 , 0 , 155 ), false )
else
dxDrawRectangle ( x * 745 , y * 625 , x * 185 , y * 80 , tocolor ( 100 , 100 , 100 , 140 ), false )
end
dxDrawText ( "Statystyki" , x * 740 , y * 500 , x * 930 , y * 830 , tocolor ( 255 , 255 , 255 , 255 ), 1.1 / zoomx , font , "center" , "center" , false )
dxDrawRectangle ( x * 743 , y * 375 , x * 2 , y * 80 , tocolor ( 0 , 102 , 255 , 255 ), false )
if not isMouseIn ( x * 740 , y * 375 , x * 190 , y * 80 ) then
dxDrawRectangle ( x * 745 , y * 375 , x * 185 , y * 80 , tocolor ( 0 , 0 , 0 , 155 ), false )
else
dxDrawRectangle ( x * 745 , y * 375 , x * 185 , y * 80 , tocolor ( 100 , 100 , 100 , 140 ), false )
end
dxDrawText ( "Klawiszologia" , x * 740 , y * 30 , x * 930 , y * 800 , tocolor ( 255 , 255 , 255 , 255 ), 1.1 / zoomx , font , "center" , "center" , false )
-- TEKST
dxDrawText ( "Powergy RPG" , x * 960 , y * 250 , x * 1300 , y * 330 , tocolor ( 255 , 255 , 255 , 255 ), 2 / zoomx , "default-bold" , "center" , "center" , false )
dxDrawText ( text , x * 960 , y * 450 , x * 1300 , y * 650 , tocolor ( 255 , 255 , 255 , 255 ), 0.7 / zoomx , font , "center" , "center" , false , true , false , true )
end
bindKey ( "F1" , "down" , function()
if f1XD == false then
tick = getTickCount ()
f1XD = true
text = ""
removeEventHandler ( "onClientRender" , root , gui )
showCursor ( false )
else
tick = getTickCount ()
f1XD = false
showCursor ( true )
text = info
addEventHandler ( "onClientRender" , root , gui )
end
end )
addEventHandler ( "onClientClick" , root , function( b , s )
if b ~= "state" and s ~= "down" then return end
if f1XD ~= false then return end
if isMouseIn ( x * 740 , y * 250 , x * 190 , y * 80 ) then
text = info
elseif isMouseIn ( x * 740 , y * 500 , x * 190 , y * 80 ) then
text = przewodnik
elseif isMouseIn ( x * 740 , y * 375 , x * 190 , y * 80 ) then
text = klawiszologia
elseif isMouseIn ( x * 740 , y * 625 , x * 190 , y * 80 ) then
text = statystki
elseif isMouseIn ( x * 740 , y * 750 , x * 190 , y * 80 ) then
text = tworcy
end
end )
Wysłany: 2020-10-31, 12:16
_jvneczek
Wiek: 22 Na forum: 4326 dni Posty: 1513
Nick w MP: _jvneczek
Piwa : 3949
local sw , sh = guiGetScreenSize ()
local rw , rh = 1920 , 1080
local x , y = ( sw / rw ),( sh / rh )
local zoomx = rw / sw
local font = dxCreateFont ( "f.ttf" , 15 )
function dot ( xd ) -- fukcja odpowiadaj ? ca za przecinek w pien ? dzach
local left , num , right = string . match ( xd , '^([^%d]*%d)(%d*)(.-)$' )
return left ..( num : reverse (): gsub ( '(%d%d%d)' , '%1,' ): reverse ()).. right
end
function secondsToClock ( seconds )
seconds = seconds or 0
if seconds <= 0 then
return "00:00:00" ;
else
hours = string . format ( "%02.f" , math . floor ( seconds / 3600 ));
mins = string . format ( "%02.f" , math . floor ( seconds / 60 - ( hours * 60 )));
secs = string . format ( "%02.f" , math . floor ( seconds - hours * 3600 - mins * 60 ));
return "" .. hours .. " godziny " .. mins .. " minuty"
end
end
local pid = getElementData ( localPlayer , "player:sid" ) or "B??d"
local rp = getElementData ( localPlayer , "player:srp" ) or "0"
local bank_money = getElementData ( localPlayer , "player:bank_money" ) or "brak"
local hajs = getPlayerMoney ( localPlayer ) or "0"
local rejka = getElementData ( localPlayer , "player:registerdate" ) or "---"
local waznedo = getElementData ( localPlayer , "player:premiumdate" ) or "Brak"
local hours = secondsToClock ( 60 * tonumber ( getElementData ( localPlayer , "player:hours" )))
local hourss = getElementData ( localPlayer , "player:hours" )
local org = getElementData ( localPlayer , "player:organization" ) or "Brak"
local worker = getElementData ( localPlayer , "player:workinjob" ) or "Brak"
local a =( getElementData ( localPlayer , "player:license:pjA" )== 1 and "TAK" or "NIE" )
local b =( getElementData ( localPlayer , "player:license:pjB" )== 1 and "TAK" or "NIE" )
local c =( getElementData ( localPlayer , "player:license:pjC" )== 1 and "TAK" or "NIE" )
local l =( getElementData ( localPlayer , "player:license:pjL" )== 1 and "TAK" or "NIE" )
local premium = getElementData ( localPlayer , "player:premium" )
if premium then premium = "#d5bb44PREMIUM" else premium = "#ffffffGRACZ" end
function isMouseIn ( psx , psy , pssx , pssy , abx , aby )
if not isCursorShowing () then return end
local cx , cy = getCursorPosition ()
cx , cy = cx * sw , cy * sh
if cx >= psx and cx <= psx + pssx and cy >= psy and cy <= psy + pssy then
return true , cx , cy
else
return false
end
end
local text = ""
local info = [[
.
]]
local przewodnik = [[
.
]]
local klawiszologia = [[
.
]]
local statystki = "#FFFFFFNick:#0066ff " .. getPlayerName ( localPlayer ): gsub ( "#%x%x%x%x%x%x" , "" ).. "\n#ffffffUID:#0066ff " .. pid .. "\n#ffffffReputacja:#0066ff " .. dot ( rp ).. "\n#ffffffKonto: " .. premium .. "\n#ffffffData rejestracji:#0066ff " .. rejka .. "\n#ffffffPremium wa?ne do:#0066ff " .. waznedo .. "\n#ffffffPrzegrany czas:#0066ff " .. hours .. " (" .. dot ( hourss ).. " minut)\n#ffffffMinuty na s?u?bie:#0066ff " .. dot ( worker ).. " Minut\n#ffffffOrganizacja:#0066ff " .. org .. "\n#ffffffPrawo Jazdy: #0066ffA:#ffffff " .. a .. " #0066ffB:#ffffff " .. b .. " #0066ffC:#ffffff " .. c .. " #0066ffL:#ffffff " .. l .. ""
local tworcy = [[
..
]]
local tick = getTickCount ()
local f1XD = false
function gui ()
-- G ?? WNY PANEL
dxDrawRectangle ( x * 965 , y * 240 , x * 340 , y * 600 , tocolor ( 0 , 0 , 0 , 155 ), false )
dxDrawRectangle ( x * 963 , y * 240 , x * 2 , y * 600 , tocolor ( 0 , 102 , 255 , 255 ), false )
-- PRZYCISKI
dxDrawRectangle ( x * 743 , y * 250 , x * 2 , y * 80 , tocolor ( 0 , 102 , 255 , 255 ), false )
if not isMouseIn ( x * 740 , y * 250 , x * 190 , y * 80 ) then
dxDrawRectangle ( x * 745 , y * 250 , x * 185 , y * 80 , tocolor ( 0 , 0 , 0 , 155 ), false )
else
dxDrawRectangle ( x * 745 , y * 250 , x * 185 , y * 80 , tocolor ( 100 , 100 , 100 , 140 ), false )
end
dxDrawText ( "Strona G??wna" , x * 740 , y * 250 , x * 930 , y * 330 , tocolor ( 255 , 255 , 255 , 255 ), 1.1 / zoomx , font , "center" , "center" , false )
dxDrawRectangle ( x * 743 , y * 500 , x * 2 , y * 80 , tocolor ( 0 , 102 , 255 , 255 ), false )
if not isMouseIn ( x * 740 , y * 500 , x * 190 , y * 80 ) then
dxDrawRectangle ( x * 745 , y * 500 , x * 185 , y * 80 , tocolor ( 0 , 0 , 0 , 155 ), false )
else
dxDrawRectangle ( x * 745 , y * 500 , x * 185 , y * 80 , tocolor ( 100 , 100 , 100 , 140 ), false )
end
dxDrawText ( "Przewodnik" , x * 740 , y * 500 , x * 930 , y * 580 , tocolor ( 255 , 255 , 255 , 255 ), 1.1 / zoomx , font , "center" , "center" , false )
dxDrawRectangle ( x * 743 , y * 750 , x * 2 , y * 80 , tocolor ( 0 , 102 , 255 , 255 ), false )
if not isMouseIn ( x * 740 , y * 750 , x * 190 , y * 80 ) then
dxDrawRectangle ( x * 745 , y * 750 , x * 185 , y * 80 , tocolor ( 0 , 0 , 0 , 155 ), false )
else
dxDrawRectangle ( x * 745 , y * 750 , x * 185 , y * 80 , tocolor ( 100 , 100 , 100 , 140 ), false )
end
dxDrawText ( "Tw?rcy" , x * 740 , y * 750 , x * 930 , y * 830 , tocolor ( 255 , 255 , 255 , 255 ), 1.1 / zoomx , font , "center" , "center" , false )
dxDrawRectangle ( x * 743 , y * 625 , x * 2 , y * 80 , tocolor ( 0 , 102 , 255 , 255 ), false )
if not isMouseIn ( x * 740 , y * 625 , x * 190 , y * 80 ) then
dxDrawRectangle ( x * 745 , y * 625 , x * 185 , y * 80 , tocolor ( 0 , 0 , 0 , 155 ), false )
else
dxDrawRectangle ( x * 745 , y * 625 , x * 185 , y * 80 , tocolor ( 100 , 100 , 100 , 140 ), false )
end
dxDrawText ( "Statystyki" , x * 740 , y * 500 , x * 930 , y * 830 , tocolor ( 255 , 255 , 255 , 255 ), 1.1 / zoomx , font , "center" , "center" , false )
dxDrawRectangle ( x * 743 , y * 375 , x * 2 , y * 80 , tocolor ( 0 , 102 , 255 , 255 ), false )
if not isMouseIn ( x * 740 , y * 375 , x * 190 , y * 80 ) then
dxDrawRectangle ( x * 745 , y * 375 , x * 185 , y * 80 , tocolor ( 0 , 0 , 0 , 155 ), false )
else
dxDrawRectangle ( x * 745 , y * 375 , x * 185 , y * 80 , tocolor ( 100 , 100 , 100 , 140 ), false )
end
dxDrawText ( "Klawiszologia" , x * 740 , y * 30 , x * 930 , y * 800 , tocolor ( 255 , 255 , 255 , 255 ), 1.1 / zoomx , font , "center" , "center" , false )
-- TEKST
dxDrawText ( "Powergy RPG" , x * 960 , y * 250 , x * 1300 , y * 330 , tocolor ( 255 , 255 , 255 , 255 ), 2 / zoomx , "default-bold" , "center" , "center" , false )
dxDrawText ( text , x * 960 , y * 450 , x * 1300 , y * 650 , tocolor ( 255 , 255 , 255 , 255 ), 0.7 / zoomx , font , "center" , "center" , false , true , false , true )
end
bindKey ( "F1" , "down" , function()
if f1XD == false then
tick = getTickCount ()
f1XD = true
text = ""
removeEventHandler ( "onClientRender" , root , gui )
showCursor ( false )
else
tick = getTickCount ()
f1XD = false
showCursor ( true )
text = info
addEventHandler ( "onClientRender" , root , gui )
end
end )
addEventHandler ( "onClientClick" , root , function( b , s )
if b ~= "state" and s ~= "down" then return end
if f1XD ~= false then return end
if isMouseIn ( x * 740 , y * 250 , x * 190 , y * 80 ) then
text = info
elseif isMouseIn ( x * 740 , y * 500 , x * 190 , y * 80 ) then
text = przewodnik
elseif isMouseIn ( x * 740 , y * 375 , x * 190 , y * 80 ) then
text = klawiszologia
elseif isMouseIn ( x * 740 , y * 625 , x * 190 , y * 80 ) then
text = statystki
elseif isMouseIn ( x * 740 , y * 750 , x * 190 , y * 80 ) then
text = tworcy
end
end )
Wysłany: 2020-10-31, 12:21
Lucky!!! :)
Wiek: 20 Na forum: 2372 dni Posty: 121
Nick w MP: Lucky
Piwa : 1163
psych0. , wci?? wyst?puje ten b??d
Wysłany: 2020-10-31, 13:28
vAnimo
Zielony w luła
Wiek: 19 Na forum: 2312 dni Posty: 165
Nick w MP: vAnimo
Piwa : 882
Chcesz ?eby gracz m?g? uzywa? F1 podczas logowania?
addEventHandler ( "onClientPlayerSpawn" , resourceRoot ,function( el )
bindKey ( "F1" , "down" , rysuj )
end )
function rysuj ()
if f1XD == false then
tick = getTickCount ()
f1XD = true
text = ""
removeEventHandler ( "onClientRender" , root , gui )
showCursor ( false )
else
tick = getTickCount ()
f1XD = false
showCursor ( true )
text = info
addEventHandler ( "onClientRender" , root , gui )
end
end
Tagi: panel
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: