mixLoLmix2
Programista
Wiek: 35 Na forum: 4113 dni Posty: 454
Nick w MP: TomeQmix
Piwa : 1915
Mam ma?y problem, Wchodze w marker i wyskakuj? mi b??dy i nic sie nie dzeje
local screenW , screenH = guiGetScreenSize ()
function Parking ()
odbior . window [ 1 ] = guiCreateWindow ( 0.0 , 0.0 , 0.0 , 0.0 , "" , true )
dxDrawRectangle ( screenW * 0.2625 , screenH * 0.3100 , screenW * 0.4713 , screenH * 0.3967 , tocolor ( 19 , 19 , 234 , 96 ), false )
dxDrawRectangle ( screenW * 0.2000 , screenH * 0.2500 , screenW * 0.6088 , screenH * 0.0600 , tocolor ( 245 , 0 , 0 , 178 ), false )
dxDrawText ( "Parking Policyjny" , screenW * 0.3750 , screenH * 0.2533 , screenW * 0.6188 , screenH * 0.3100 , tocolor ( 255 , 255 , 255 , 255 ), 2.00 , "default" , "center" , "top" , false , false , false , false , false )
dxDrawText ( "Pojazdy" , 229 , 176 , 343 , 196 , tocolor ( 255 , 255 , 255 , 255 ), 1.00 , "pricedown" , "left" , "top" , false , false , false , false , false )
dxDrawText ( "Informacje" , 391 , 189 , 505 , 222 , tocolor ( 255 , 255 , 255 , 255 ), 1.00 , "pricedown" , "left" , "top" , false , false , false , false , false )
lista = guiCreateGridList ( 0.27 , 0.34 , 0.16 , 0.37 , true )
guiGridListAddColumn ( lista , "ID" , 0.5 )
guiGridListAddColumn ( lista , "Rejestracja" , 0.5 )
data = guiCreateLabel ( 0.43 , 0.37 , 0.29 , 0.05 , "Data odholowania:" , true )
ost = guiCreateLabel ( 0.43 , 0.44 , 0.29 , 0.05 , "Ostatni Kierowca:" , true )
fun = guiCreateLabel ( 0.43 , 0.50 , 0.29 , 0.05 , "Funkcjonariusz nak?adj?cy kare:" , true )
powu = guiCreateLabel ( 0.44 , 0.56 , 0.28 , 0.05 , "pow?d:" , false )
klk = guiCreateButton ( 0.63 , 0.64 , 0.10 , 0.05 , "Zaplac" , true )
nicheh = guiCreateLabel ( 0.44 , 0.67 , 0.11 , 0.04 , "" , true )
end
tabela = {}
addEvent ( "odbior:refresh" , true )
addEventHandler ( "odbior:refresh" , root ,function( tabelka )
if not tabelka then return end
local grid = lista
addEventHandler ( "onClientRender" , root , Policja )
for i = 1 , 6 do
guiSetText ( odbior . text [ i ], "" )
end
guiGridListClear ( lista )
for i , v in pairs ( tabelka ) do
local row = guiGridListAddRow ( lista )
guiGridListSetItemText ( lista , row , 1 , v [ "idpojazdu" ], false , false )
guiGridListSetItemText ( lista , row , 2 , v [ "rejestracja" ], false , false )
tabela [ tonumber ( v [ "idpojazdu" ])] = v
end
end )
B??dy s? tutaj
addEvent ( "odbior:refresh" , true )
addEventHandler ( "odbior:refresh" , root ,function( tabelka )
if not tabelka then return end
local grid = lista
addEventHandler ( "onClientRender" , root , Policja )
for i = 1 , 6 do
guiSetText ( odbior . text [ i ], "" )
end
guiGridListClear ( lista )
for i , v in pairs ( tabelka ) do
local row = guiGridListAddRow ( lista )
guiGridListSetItemText ( lista , row , 1 , v [ "idpojazdu" ], false , false )
guiGridListSetItemText ( lista , row , 2 , v [ "rejestracja" ], false , false )
tabela [ tonumber ( v [ "idpojazdu" ])] = v
end
end )
//Jak by?o na zwyk?ym gui to dza?a?o a jak doda?em draw to sie popsu?o
Podpis
Zajmuję się pisaniem zaawansowanych skryptów lua na zamówienie za bardzo niską cene.
Oraz pomoc przy serwerze mta/forum i tym podobnych.
Discord: TomeQmix#7106