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

Wysłany: 2012-03-01, 13:21


luki123luki123

Place Game






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

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

Dalej robi? ten panel i takie co? zrobi?em :
Serwer:
Kod:

addEvent("dodaj", true)
addEventHandler("dodaj", getRootElement(), function(player, potem)
local accName = getAccountName ( getPlayerAccount ( thePlayer ) )
aclGroupAddObject (aclGetGroup("Policja"), "user."..accName)
end

end)
addEvent("usun", true)
addEventHandler("usun", getRootElement(), function(player, potem)
local accName = getAccountName ( getPlayerAccount ( thePlayer ) )
aclGroupRemoveObject (aclGetGroup("Policja"), "user."..accName)
end

end)


I w tym rzecz :
Serwer konsola

/debugcript


Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-03-01, 15: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

Kod:

addEvent("dodaj", true)
addEventHandler("dodaj", getRootElement(),
function(player)
local accName = getAccountName ( getPlayerAccount (player) )
aclGroupAddObject (aclGetGroup("Policja"), "user."..accName)
end)

addEvent("usun", true)
addEventHandler("usun", getRootElement(),
function(player)
local accName = getAccountName ( getPlayerAccount (player) )
aclGroupRemoveObject (aclGetGroup("Policja"), "user."..accName)
end)


Ostatnio zmieniony przez Jacob 2012-03-01, 19:41, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-03-01, 19:19


luki123luki123

Place Game






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

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

dalej s? te same b??dy w serwer i na debugscript

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-03-01, 19:42


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

Poprawi?em skrypt. Powinno by? ju? wszystko OK.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-03-01, 19:52


luki123luki123

Place Game






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

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

zobacz na kolsole

[ Dodano: 2012-03-01, 19:55 ]
ok jest serwer ok teraz clinet
zoabcz na debugscript

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-03-01, 19:57


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

luki123luki123, daj kod z pliku panel_c.lua

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-03-01, 19:58


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(356,62,406,666,"Panel lidera",false)
GUIEditor_Button[1] = guiCreateButton(246,37,137,53,"Dodaj",false,GUIEditor_Window[1])
GUIEditor_Button[2] = guiCreateButton(245,129,140,50,"Usun",false,GUIEditor_Window[1])
GUIEditor_Button[3] = guiCreateButton(237,549,158,73,"Wyjdz",false,GUIEditor_Window[1])
GUIEditor_Grid[1] = guiCreateGridList(9,16,5,5,false,GUIEditor_Window[1])
guiGridListSetSelectionMode(GUIEditor_Grid[1],2)
GUIEditor_Grid[2] = guiCreateGridList(9,23,203,619,false,GUIEditor_Window[1])
guiGridListSetSelectionMode(GUIEditor_Grid[2],2)

--------------------------------/okna
--------------------------------zmienne
local team = getTeamFromName("Pogotowie")
--------------------------------/zmienne
--------------------------------funkcej
function show()
if getPlayerTeam(getLocalPlayer()) == team then
local column = guiGridListAddColumn( GUIEditor_Grid[1], "Player", 0.99 )
if ( column ) then
for id, playeritem in ipairs(getElementsByType("player")) do
local row = guiGridListAddRow ( GUIEditor_Grid[1] )
guiGridListSetItemText ( GUIEditor_Grid[1], 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
addEventHandler( "onClientGUIClick",GUIEditor_Button[3],wyjdz)end

function dodaj()
local player = guiGridListGetItemText (GridList1, guiGridListGetSelectedItem (GridList1), 1)
triggerServerEvent("dadaj", getRootElement(), player, getLocalPlayer())
end

function usun()
local player = guiGridListGetItemText (GridList1, guiGridListGetSelectedItem (GridList1), 1)
triggerServerEvent("usun", getRootElement(), player, getLocalPlayer())
end
--------------------------------/funkcje
------------------------------handlery
addEventHandler( "onClientGUIClick", GUIEditor_Button[3], wyjdz )
addEventHandler( "onClientGUIClick", GUIEditor_Button[1] , dodaj )
addEventHandler( "onClientGUIClick", GUIEditor_Button[2] , usun )
addCommandHandler("pogop", show)

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


Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-03-01, 20:03


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

luki123luki123, kt?ra to linijka 43? W tym kodzie b??du nie widz? :O

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-03-01, 20:06


luki123luki123

Place Game






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

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

Kod:

local player = guiGridListGetItemText (GridList1, guiGridListGetSelectedItem (GridList1), 1)


[ Dodano: 2012-03-01, 20:08 ]
Daj kawa?ek

[ Dodano: 2012-03-01, 20:08 ]
Zmian?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-03-01, 20:09


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(356,62,406,666,"Panel lidera",false)
GUIEditor_Button[1] = guiCreateButton(246,37,137,53,"Dodaj",false,GUIEditor_Window[1])
GUIEditor_Button[2] = guiCreateButton(245,129,140,50,"Usun",false,GUIEditor_Window[1])
GUIEditor_Button[3] = guiCreateButton(237,549,158,73,"Wyjdz",false,GUIEditor_Window[1])
GUIEditor_Grid[1] = guiCreateGridList(9,16,5,5,false,GUIEditor_Window[1])
guiGridListSetSelectionMode(GUIEditor_Grid[1],2)
GUIEditor_Grid[2] = guiCreateGridList(9,23,203,619,false,GUIEditor_Window[1])
guiGridListSetSelectionMode(GUIEditor_Grid[2],2)

--------------------------------/okna
--------------------------------zmienne
local team = getTeamFromName("Pogotowie")
--------------------------------/zmienne
--------------------------------funkcej
function show()
if getPlayerTeam(getLocalPlayer()) == team then
local column = guiGridListAddColumn( GUIEditor_Grid[1], "Player", 0.99 )
if ( column ) then
for id, playeritem in ipairs(getElementsByType("player")) do
local row = guiGridListAddRow ( GUIEditor_Grid[1] )
guiGridListSetItemText ( GUIEditor_Grid[1], 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
addEventHandler( "onClientGUIClick",GUIEditor_Button[3],wyjdz)

function dodaj()
local player = guiGridListGetItemText (GUIEditor_Grid[1], guiGridListGetSelectedItem (GUIEditor_Grid[1]), 1)
triggerServerEvent("dadaj", getRootElement(), player, getLocalPlayer())
end

function usun()
local player = guiGridListGetItemText (GUIEditor_Grid[1], guiGridListGetSelectedItem (GUIEditor_Grid[1]), 1)
triggerServerEvent("usun", getRootElement(), player, getLocalPlayer())
end
--------------------------------/funkcje
------------------------------handlery
addEventHandler( "onClientGUIClick", GUIEditor_Button[3], wyjdz )
addEventHandler( "onClientGUIClick", GUIEditor_Button[1] , dodaj )
addEventHandler( "onClientGUIClick", GUIEditor_Button[2] , usun )
addCommandHandler("pogop", show)

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


//Ma?a poprawka poprawione jeszcze raz.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-03-01, 20:13


luki123luki123

Place Game






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

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

a tu nic bo nie dzia?a:

Kod:

addEventHandler( "onClientGUIClick",GUIEditor_Button[3],wyjdz)


[ Dodano: 2012-03-01, 20:13 ]
Kod:

function wyjdz()
guiSetVisible(GUIEditor_Window[1], false)
showCursor(false)
end
addEventHandler( "onClientGUIClick",GUIEditor_Button[3],wyjdz)
end


[ Dodano: 2012-03-01, 20:16 ]
end co? blokuje

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-03-01, 20:20


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

Poprawi?em kod. Spr?buj jeszcze raz.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-03-01, 20:29


luki123luki123

Place Game






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

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

[/URL]

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-03-01, 20: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

Kod daj. Napewno da?e? ten kod co ja wstawi?em?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-03-01, 20:39


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(356,62,406,666,"Panel lidera",false)
GUIEditor_Button[1] = guiCreateButton(246,37,137,53,"Dodaj",false,GUIEditor_Window[1])
GUIEditor_Button[2] = guiCreateButton(245,129,140,50,"Usun",false,GUIEditor_Window[1])
GUIEditor_Button[3] = guiCreateButton(237,549,158,73,"Wyjdz",false,GUIEditor_Window[1])
GUIEditor_Grid[1] = guiCreateGridList(9,16,5,5,false,GUIEditor_Window[1])
guiGridListSetSelectionMode(GUIEditor_Grid[1],2)
GUIEditor_Grid[2] = guiCreateGridList(9,23,203,619,false,GUIEditor_Window[1])
guiGridListSetSelectionMode(GUIEditor_Grid[2],2)

--------------------------------/okna
--------------------------------zmienne
local team = getTeamFromName("Pogotowie")
--------------------------------/zmienne
--------------------------------funkcej
function show()
if getPlayerTeam(getLocalPlayer()) == team then
local column = guiGridListAddColumn( GUIEditor_Grid[1], "Player", 0.99 )
if ( column ) then
for id, playeritem in ipairs(getElementsByType("player")) do
local row = guiGridListAddRow ( GUIEditor_Grid[1] )
guiGridListSetItemText ( GUIEditor_Grid[1], 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
addEventHandler( "onClientGUIClick",GUIEditor_Button[3],wyjdz)


function dodaj()
local player = guiGridListGetItemText (GUIEditor_Grid[1], guiGridListGetSelectedItem (GUIEditor_Grid[1]), 1)
triggerServerEvent("dadaj", getRootElement(), player, getLocalPlayer())
end

function usun()
local player = guiGridListGetItemText (GUIEditor_Grid[1], guiGridListGetSelectedItem (GUIEditor_Grid[1]), 1)
triggerServerEvent("usun", getRootElement(), player, getLocalPlayer())
end
--------------------------------/funkcje
------------------------------handlery
addEventHandler( "onClientGUIClick", GUIEditor_Button[3], wyjdz )
addEventHandler( "onClientGUIClick", GUIEditor_Button[1] , dodaj )
addEventHandler( "onClientGUIClick", GUIEditor_Button[2] , usun )
addCommandHandler("pogop", show)

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


[ Dodano: 2012-03-01, 20:44 ]
Jacob, Tu co? jest na debugscript pokazuje z
Kod:

aclGroupRemoveObject (aclGetGroup("Policja"), "user."..accName)
end


o
Kod:

accName


[ Dodano: 2012-03-01, 20:45 ]


Postaw piwo autorowi tego posta
 

 
Tagi: palen :: lidera :: gui
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Palen lidera gui 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