Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: obliczyc
1. jak to obliczyc ?
potrzebuje zrobi? skrypt kt?ry b?dzie wykrywa? pozycje zaznaczonego itemu na liscie, zrobi?em ju? takie cos:
[code]GUIEditor = {
gridlist = {},
window = {},
label = {}
}
GUIEditor.window[1] = guiCreateWindow(120, 94, 422, 355, "", false)
guiWindowSetSizable(GUIEditor.window[1], false)

GUIEditor.label[1] = guiCreateLabel(10, 23, 402, 82, "", false, GUIEditor.window[1])
GUIEditor.gridlist[1] = guiCreateGridList(10, 105, 402, 240, false, GUIEditor.window[1])
guiGridListAddColumn(GUIEditor.gridlist[1], "Test", 0.9)
guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "-", false, false)
showCursor(true)

x,y,rx,ry = 100,100,500,100
addEventHandler("onClientRender", root,
function()
dxDrawRectangle(x, y, rx, ry, tocolor(255, 255, 255, 100), true)
end
)

x = 0
while x < 25 do
local row = guiGridListAddRow ( GUIEditor.gridlist[1] )
guiGridListSetItemText ( GUIEditor.gridlist[1], row, 1, tostring(math.random(1000,9999)), false, false )
x = x + 1
end

function pobierzpozycje(element)
poz = guiGridListGetSelectedItem (element)
gui = getElementParent (element)
xgrid,ygrid = guiGetPosition(element,false)
xgui,ygui = guiGetPosition(gui,false)
xgirds,ygrids = guiGetSize ( element, false )

offset = 14 -- wysokosc 1 itemu z listy
xset = xgrid + xgui
yset = ygrid + xgui

xend = xset+8
yend = yset-2+(offset*poz)
xxend = xgirds-40
yyend = offset
return xend,yend,xxend,...