local dxpS = {guiGetScreenSize()}
local dxpK = {401,500}
local dxpP = {dxpS[1]/2-dxpK[1]/2,dxpS[2]/2-dxpK[2]/2}
local screen = {}
local comandofund = false
local functionlist = 0
local commandfunction = -dxpK[1]
local r = {0,0,0}--fekete
local H = {157, 126, 88}--hover
local coloredText = \"#ffffff\"
local listacomandos = { -- \"..\"
{\"/teszt\",\"teszt\",10},
}
function comandos()
if not comandofund then return end
commandfunction = commandfunction + 10
if commandfunction > dxpP[2] then
commandfunction = dxpP[2]
end
screen = {dxpP[1],commandfunction}
dxDrawRectangle(screen[1],screen[2],dxpK[1],dxpK[2],tocolor(r[1],r[2],r[3],255/2))
dxDrawRectangle(screen[1],screen[2],dxpK[1],50,tocolor(r[1],r[2],r[3],255/3))
dxDrawRectangle(screen[1],screen[2],dxpK[1],1,tocolor(r[1],r[2],r[3],255/2))
dxDrawRectangle(screen[1],screen[2],1,dxpK[2],tocolor(r[1],r[2],r[3],255/2))
dxDrawRectangle(screen[1]+400,screen[2],1,dxpK[2],tocolor(r[1],r[2],r[3],255/2))
dxDrawRectangle(screen[1]+200,screen[2]+50,1,dxpK[2]-50,tocolor(r[1],r[2],r[3],255/1.5))
dxDrawText(\"Valami MTA #4097DFSzabályzat\",screen[1]+60,screen[2]+10,dxpK[1],dxpK[2],tocolor(255,255,255,255),2,\"default-bold\",\"left\",\"top\",false, false, false, true)
dxDrawText(\"Szabályok:\", screen[1]+70,screen[2]+70,dxpK[1],dxpK[2], tocolor(255, 255, 255, 255), 1.0, \"default-bold\", \"left\", \"top\", false, false, false, true)
dxDrawText(\"Leírások:\", screen[1]+280,screen[2]+70,dxpK[1],dxpK[2], tocolor(255, 255, 255, 255), 1.0, \"default-bold\", \"left\", \"top\", false, false, false, true)
local elecommandfunction = 0
for i, parafunctioncommand in ipairs( listacomandos ) do
if (i > functionlist and elecommandfunction < 12) then
elecommandfunction = elecommandfunction + 1
coloredText = \"#ffffff\"
dxDrawRectangle(screen[1],screen[2]+65 + elecommandfunction * 30,dxpK[1],25,tocolor(r[1],r[2],r[3],255/4))
dxDrawText(coloredText..\"/\"..tostring(parafunctioncommand[1],parafunctioncommand[2]),screen[1]+40,screen[2]+70 + elecommandfunction * 30,dxpK[1],dxpK[2], tocolor(255, 255, 255, 255), 1.0, \"default-bold\", \"left\", \"top\", false, false, false, true)
dxDrawText(coloredText..tostring(parafunctioncommand[2]),screen[1]+235,screen[2]+70 + elecommandfunction * 30,dxpK[1],dxpK[2], tocolor(255, 255, 255, 255), 1.0, \"default-bold\", \"left\", \"top\", false, false, false, true)
end
end
end
addEventHandler(\"onClientRender\",getRootElement (),comandos)
addEventHandler(\"onClientKey\", getRootElement (), function(g, v)
if not comandofund or not v then return end
if g == \"mouse_wheel_down\" then
functionlist = functionlist + 1
if functionlist > #listacomandos - 12 then
functionlist = #listacomandos - 12
end
elseif g == \"mouse_wheel_up\" then
functionlist = functionlist - 1
if functionlist < 1 then
functionlist = 0
end
end
end)
function functioncomandoslist2(dX, dY, dSZ, dM, eX, eY)
if(eX >= dX and eX <= dX+dSZ and eY >= dY and eY <= dY+dM) then
return true
else
return false
end
end
bindKey(\"c\", \"down\", function()
if comandofund then
comandofund = false
commandfunction = -500
playSound (\"fechar.mp3\")
showChat(true)
setElementData(localPlayer, \"screenmod\",false)
else
comandofund = true
playSound (\"abrir.mp3\")
showChat(false)
setElementData(localPlayer, \"screenmod\",true)
end
end)
Valaki tuda segíteni, hogyan kéne ezt a (bind c ) átalakítani mert most C gomra ugrik elő és vissza. Azt szeretném megcsinálni , hogy parancsra ugorjon elő meg hát tűnjön is el pl /infobox