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

Wysłany: 2012-03-04, 10:20


luki123luki123

Place Game






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

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

Witam robi? sobi? panele frakcji .Chce np. pogotowia .
M?j problem :
1.Co mam wybra? jakie gui:
Kod:

addEventHandler("onClientResourceStart",resourceRoot,
function()
GUIEditor_Window = {}
GUIEditor_Button = {}
GUIEditor_Grid = {}

GUIEditor_Window[1] = guiCreateWindow(351,54,347,611,"Panel pogotowia by luki123",false)
GUIEditor_Grid[1] = guiCreateGridList(9,23,171,576,false,GUIEditor_Window[1])
guiGridListSetSelectionMode(GUIEditor_Grid[1],2)
GUIEditor_Button[1] = guiCreateButton(193,29,140,71,"Ulecz",false,GUIEditor_Window[1])
GUIEditor_Button[2] = guiCreateButton(193,510,144,77,"Wyjdz",false,GUIEditor_Window[1])
end
)


Czy to

Kod:

-- Created: 04/03/2012 10:07
GUIEditor_Window = {}
GUIEditor_Button = {}
GUIEditor_Grid = {}

GUIEditor_Window[1] = guiCreateWindow(351,54,347,611,"Panel pogotowia by luki123",false)
GUIEditor_Grid[1] = guiCreateGridList(9,23,171,576,false,GUIEditor_Window[1])
guiGridListSetSelectionMode(GUIEditor_Grid[1],2)
GUIEditor_Button[1] = guiCreateButton(193,29,140,71,"Ulecz",false,GUIEditor_Window[1])
GUIEditor_Button[2] = guiCreateButton(193,510,144,77,"Wyjdz",false,GUIEditor_Window[1])




__________________________________________________________________
Zrobi?em serwer i clinet
Serwer:
Kod:

function Lecz (player)
if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(player)), aclGetGroup ("Admin")) then

addEvent("lecz", true)
addEventHandler("lecz", getRootElement(), function(player, potem)
local komu = getPlayerFromName ( player )
setPlayerMoney(komu, getPlayerMoney(komu) - 300)
setPlayerMoney(potem, getPlayerMoney(potem) + 300)
setElementHealth ( komu, 200 )


end)

end
end


Clinet:
Kod:

--------------------------------okna
-- Created: 04/03/2012 10:07
GUIEditor_Window = {}
GUIEditor_Button = {}
GUIEditor_Grid = {}

GUIEditor_Window[1] = guiCreateWindow(351,54,347,611,"Panel pogotowia by luki123",false)
GridList1 = guiCreateGridList(9,23,171,576,false,GUIEditor_Window[1])
guiGridListSetSelectionMode(GUIEditor_Grid[1],2)
Button1 = guiCreateButton(193,29,140,71,"Ulecz",false,GUIEditor_Window[1])
Button2 = guiCreateButton(193,510,144,77,"Wyjdz",false,GUIEditor_Window[1])
--------------------------------/okna
--------------------------------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 close()
guiSetVisible(GUIEditor_Window[1], false)
showCursor(false)
end
function lecz()
local player = guiGridListGetItemText (GridList1, guiGridListGetSelectedItem (GridList1), 1)
triggerServerEvent("lecz", getRootElement(), player, getLocalPlayer())
end
--------------------------------/funkcje
------------------------------handlery
addEventHandler( "onClientGUIClick", Button2, close )
addEventHandler( "onClientGUIClick", Button1, lecz )
addCommandHandler("pogop", show)

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




Konsola:


/debugscript 3



Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-03-04, 11:10


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

Robisz te same b??dy co wcze?niej ._.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-03-04, 11:35


luki123luki123

Place Game






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

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

Mam nowy b??d :

Serwer:
t funkcje s? z?e :

Kod:

function Lecz (player)
if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(player)), aclGetGroup ("Admin")) then

addEvent("lecz", true)
addEventHandler("lecz", getRootElement(), function(player, potem)
local komu = getPlayerFromName ( player )
setPlayerMoney(komu, getPlayerMoney(komu) - 300)
setPlayerMoney(potem, getPlayerMoney(potem) + 300)
setElementHealth ( komu, 200 )


end)

end
end


[ Dodano: 2012-03-04, 11:58 ]
Mo?e mi kto? poda? jakie funkcje powin??em u?y? do zrobienia panelu pd i ammo

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-03-04, 12:45


Paweł509







Wiek: 29
Na forum: 5215 dni
Posty: 11



Respekt: 50

No mam na cmd a chce zrobi? na gui i to i to nie chodzi zr?bcie ten panel :0 pomo?ecie mi te?

Postaw piwo autorowi tego posta
 

 
Tagi: panele
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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