Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2012-03-21, 21:00


luki123luki123

Place Game






Wiek: 28
Na forum: 5275 dni
Posty: 1948
Nick w MP: LuKiO

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

Dzia?a tylko teraz czemu si? w??cza panel na pocz?tku ??

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-03-21, 21:50


Jacob

Głupiomądry






Wiek: 28
Na forum: 5502 dni
Posty: 967
Nick w MP: Jacob

Piwa: 786

Respekt: 212,3
Respekt: 212,3Respekt: 212,3

Daj client.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-03-22, 12:16


luki123luki123

Place Game






Wiek: 28
Na forum: 5275 dni
Posty: 1948
Nick w MP: LuKiO

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

Kod:

--------------------------------okna
GUIEditor_Window = {}
GUIEditor_Button = {}
GUIEditor_Grid = {}

GUIEditor_Window[1] = guiCreateWindow(238,-4,344,642,"Panel Pomocy Drogowej",false)

GridList1 = guiCreateGridList(12,24,169,582,false,GUIEditor_Window[1])

Button1 = guiCreateButton(190,32,145,53,"Fix",false,GUIEditor_Window[1])

Button2 = guiCreateButton(183,527,152,63,"Wyjdz",false,GUIEditor_Window[1])

Button3 = guiCreateButton(189,92,146,56,"Nitro",false,GUIEditor_Window[1])
--------------------------------/okna
--------------------------------zmienne
--local team = getTeamFromName("Pomoc Drogowa")
--------------------------------/zmienne
--------------------------------funkcej
function show()
-- if getPlayerTeam(getLocalPlayer()) == team then
local column = guiGridListAddColumn( GridList1, "Player", 0.99 )
if ( column ) then
for id, playeritem in ipairs(getElementsByType("player")) do
local row = guiGridListAddRow ( GridList1 )
guiGridListSetItemText ( GridList1, row, column, getPlayerName ( playeritem ), false, false )
-- end

end
guiSetVisible(GUIEditor_Window[1], true)
showCursor(true)
end
end
function wyjdz()
guiSetVisible(GUIEditor_Window[1], false)
showCursor(false)
end
function fix()
local player = guiGridListGetItemText (GridList1, guiGridListGetSelectedItem (GridList1), 1)
triggerServerEvent("fix", getRootElement(), player, getLocalPlayer())
end
function nitro()
local player = guiGridListGetItemText (GridList1, guiGridListGetSelectedItem (GridList1), 1)
triggerServerEvent("nitro", getRootElement(), player, getLocalPlayer())
end
--------------------------------/funkcje
------------------------------handlery
addEventHandler( "onClientGUIClick", Button1, fix )
addEventHandler( "onClientGUIClick", Button2, wyjdz )
addEventHandler( "onClientGUIClick", Button3, nitro )
addCommandHandler("pogop", show)

------------------------------/handlery



Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-03-22, 12:37


Jacob

Głupiomądry






Wiek: 28
Na forum: 5502 dni
Posty: 967
Nick w MP: Jacob

Piwa: 786

Respekt: 212,3
Respekt: 212,3Respekt: 212,3

jakie? b??dy?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-03-22, 13:04


luki123luki123

Place Game






Wiek: 28
Na forum: 5275 dni
Posty: 1948
Nick w MP: LuKiO

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

nic

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-03-22, 15:33


Jacob

Głupiomądry






Wiek: 28
Na forum: 5502 dni
Posty: 967
Nick w MP: Jacob

Piwa: 786

Respekt: 212,3
Respekt: 212,3Respekt: 212,3

Kod:

--------------------------------okna
GUIEditor_Window = {}
GUIEditor_Button = {}
GUIEditor_Grid = {}

GUIEditor_Window[1] = guiCreateWindow(238,-4,344,642,"Panel Pomocy Drogowej",false)
guiSetVisible(GUIEditor_Window[1], false)
GridList1 = guiCreateGridList(12,24,169,582,false,GUIEditor_Window[1])

Button1 = guiCreateButton(190,32,145,53,"Fix",false,GUIEditor_Window[1])

Button2 = guiCreateButton(183,527,152,63,"Wyjdz",false,GUIEditor_Window[1])

Button3 = guiCreateButton(189,92,146,56,"Nitro",false,GUIEditor_Window[1])
--------------------------------/okna
--------------------------------zmienne
local team = getTeamFromName("Pomoc Drogowa")
--------------------------------/zmienne
--------------------------------funkcej
function show()
if getPlayerTeam(getLocalPlayer()) == team then
local column = guiGridListAddColumn( GridList1, "Player", 0.99 )
if ( column ) then
for id, playeritem in ipairs(getElementsByType("player")) do
local row = guiGridListAddRow ( GridList1 )
guiGridListSetItemText ( GridList1, row, column, getPlayerName ( playeritem ), false, false )
end

end
guiSetVisible(GUIEditor_Window[1], true)
showCursor(true)
end
end
function wyjdz()
guiSetVisible(GUIEditor_Window[1], false)
showCursor(false)
end
function fix()
local player = guiGridListGetItemText (GridList1, guiGridListGetSelectedItem (GridList1), 1)
triggerServerEvent("fix", getRootElement(), player, getLocalPlayer())
end
function nitro()
local player = guiGridListGetItemText (GridList1, guiGridListGetSelectedItem (GridList1), 1)
triggerServerEvent("nitro", getRootElement(), player, getLocalPlayer())
end
--------------------------------/funkcje
------------------------------handlery
addEventHandler( "onClientGUIClick", Button1, fix )
addEventHandler( "onClientGUIClick", Button2, wyjdz )
addEventHandler( "onClientGUIClick", Button3, nitro )
addCommandHandler("pogop", show)

------------------------------/handlery

Wszystko dzia?a, testowane.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-03-22, 15:54


luki123luki123

Place Game






Wiek: 28
Na forum: 5275 dni
Posty: 1948
Nick w MP: LuKiO

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

Dzi?kiJacob, Dla ciebie piwo :piwo: :piwo:

[ Dodano: 2012-03-22, 16:19 ]
Close

Postaw piwo autorowi tego posta
 

 
Tagi: panel
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Panel pd Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku