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

Wysłany: 2014-07-21, 02:50


Jeey

Lua, Grafik






Wiek: 27
Na forum: 4339 dni
Posty: 98
Nick w MP: Jeey

Piwa: 383

Respekt: 80

Ostrzeżeń: 100%
Witam zrobi?em gui na ekwipunek o to kod:
addEventHandler("onClientResourceStart"resourceRoot,
    function ()
        skin265 guiCreateButton(11332224082"Skin-265"false)


        bron guiCreateButton(103632224082"Suszarka"false)


        skin266 guiCreateButton(40532224082"Skin-266"false)


        skin267 guiCreateButton(71232224082"Skin-267"false)    
    end
)
guiSetVisible skin265,false)
guiSetVisible bron,false)
guiSetVisible skin266,false)
guiSetVisible skin267,false)

    

bindKey "LAlt""down", function()
if guiGetVisible(skin265) == false then
guiSetVisible skin265true )
guiSetVisible bron,true)
guiSetVisible skin266,true)
guiSetVisible skin267,true)
addEventHandler ("onClientRender"rootekwipunek)
showCursor true )
else
removeEventHandler ("onClientRender"rootekwipunek)
guiSetVisible skin265,false)
guiSetVisible bron,false)
guiSetVisible skin266,false)
guiSetVisible skin267,false)
showCursor (false)
end
end)
function ekwipunek()
        dxDrawRectangle(02471366196tocolor(000199), false)
        dxDrawRectangle(-428113664tocolor(255255255255), true)
        dxDrawText("Ekwipunek dla Policji"580248892285tocolor(255255255255), 2.00"default-bold""left""top"falsefalsetruefalsefalse)
    end


I nw jak zrobi?,?e jak nacisne np na button skin-265 to daje zmienia mi skina na tego a jak nacisne na suszare to daje bro?.Pomo?e kto? jak to zrobi? postawie za to piwko! :)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-07-21, 06:44


Deryl







Wiek: 27
Na forum: 4435 dni
Posty: 69

Piwa: 40

Respekt: 50

Je?li chodzi o skin to:

C-side
 function zmien()
 triggerServerEvent("zmienEvent"getLocalPlayer() )
end
addEventHandler("onClientGUIClick"skin265zmien)


S-side
function skin() 
local playerName getAccountName(getPlayerAccount(source))
setElementModel source265 ) 
 end
addEvent("zmienEvent"true)
addEventHandler("zmienEvent"getRootElement(), skin


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-07-21, 10:03


Jeey

Lua, Grafik






Wiek: 27
Na forum: 4339 dni
Posty: 98
Nick w MP: Jeey

Piwa: 383

Respekt: 80

Ostrzeżeń: 100%
nie dzia?a

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-07-21, 11:56


krydianero

Samotny Wilk






Wiek: 33
Na forum: 4782 dni
Posty: 395
Nick w MP: Yoshida

Piwa: 1798

Respekt: 117,3
Respekt: 117,3

C-side
 function zmien(thePlayer)
 triggerServerEvent("zmienEvent"getRootElement(),thePlayer)
end
addEventHandler("onClientGUIClick"skin265zmien)


S-side
function skin(playerlocal playerName getAccountName(getPlayerAccount(player))--[[po co to tu da?e?? getAccountName zwraca nazwkonta a nie nazwgracza do tego powinno bygetPlayerName(playerale w tym kodzie oba sniepotrzebne--]]
setElementModel player265 ) 
 end
addEvent("zmienEvent"true)
addEventHandler("zmienEvent"getRootElement(), skin


[ Dodano: 2014-07-21, 12:01 ]
Bro?:
C-side
 function dajbron(thePlayer)
 triggerServerEvent("wpn"getRootElement(),thePlayer)
end
addEventHandler("onClientGUIClick"brondajbron)


S-side
function bron(playergiveWeapon(playeridbroni)
 end
addEvent("wpn"true)
addEventHandler("wpn"getRootElement(), bron


Podpis

Multi Drive Unlimited:Nowy projekt już wkrótce

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-07-21, 12:19


Jeey

Lua, Grafik






Wiek: 27
Na forum: 4339 dni
Posty: 98
Nick w MP: Jeey

Piwa: 383

Respekt: 80

Ostrzeżeń: 100%
tak samo nie dzia?a :/

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-07-21, 12:35


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4394 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

 function dajbron(thePlayer)
 triggerServerEvent("wpn"getRootElement(),thePlayer)
end
addEventHandler("onClientGUIClick"brondajbron)


Co to ma by? a element gracza ? Od kiedy ten event w argumencie ma element playera ? I od kiedy trigger wywo?uje si? nagle dla kazdego elementu drzewa, a dopiero potem dla zmy?lonego gracza ?



c-side :

addEventHandler "onClientGUIClick"bron, function()
    triggerServerEvent("onGiveWeapon"getLocalPlayer())
end)



s-side


addEvent "onGiveWeapon"true )
addEventHandler "onGiveWeapon"root, function()
    giveWeapon sourceID )
end)


Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-07-21, 12:51


Jeey

Lua, Grafik






Wiek: 27
Na forum: 4339 dni
Posty: 98
Nick w MP: Jeey

Piwa: 383

Respekt: 80

Ostrzeżeń: 100%
local sw,sh guiGetScreenSize()

addEventHandler("onClientResourceStart"resourceRoot, ---gui
    function ()
        skin265 guiCreateButton(113/1366*sw322/768*sh240/1366*sw82/768*sh"Skin-265"false)


        bron guiCreateButton(1036/1366*sw322/768*sh240/1366*sw82/768*sh"Suszarka"false)


        skin266 guiCreateButton(405/1366*sw322/768*sh240/1366*sw82/768*sh"Skin-266"false)


        skin267 guiCreateButton(712/1366*sw322/768*sh240/1366*sw82/768*sh"Skin-267"false)    
    end
)
guiSetVisible skin265,false)
guiSetVisible bron,false)
guiSetVisible skin266,false)
guiSetVisible skin267,false)

    

bindKey "LAlt""down", function()
if guiGetVisible(skin265) == false then
guiSetVisible skin265true )
guiSetVisible bron,trueguiSetVisible skin266,true)
guiSetVisible skin267,true)
addEventHandler ("onClientRender"rootekwipunek)
showCursor true )
else
removeEventHandler ("onClientRender"rootekwipunek)
guiSetVisible skin265,false)
guiSetVisible bron,false)
guiSetVisible skin266,false)
guiSetVisible skin267,false)
showCursor (false)
end
end)
function ekwipunek()
        dxDrawRectangle(0*sw247/768*sh1366/1366*sw196/768*shtocolor(000199), false)
        dxDrawRectangle(-4/1366*sw281/768*sh1366/1366*sw4/768*shtocolor(255255255255), true)
        dxDrawText("Ekwipunek dla Policji"580/1366*sw248/768*sh892/1366*sw285/768*shtocolor(255255255255), 2.00"default-bold""left""top"falsefalsetruefalsefalse)
    end
    
addEventHandler "onClientGUIClick"bron, function() ---suszarka 
    triggerServerEvent("onGiveWeapon"getLocalPlayer())
end)


A wi?c zrobi?em tak jak mi dali?cie ale nie dzia?a dam wam db3 :/




Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-07-21, 12:56


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4394 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

Nie dawali?my Ci kodu na bottony tylko eventy, zamie? to na :


\
        skin265 guiCreateButton(113/1366*sw322/768*sh240/1366*sw82/768*sh"Skin-265"false)


        bron guiCreateButton(1036/1366*sw322/768*sh240/1366*sw82/768*sh"Suszarka"false)


        skin266 guiCreateButton(405/1366*sw322/768*sh240/1366*sw82/768*sh"Skin-266"false)


        skin267 guiCreateButton(712/1366*sw322/768*sh240/1366*sw82/768*sh"Skin-267"false)    


Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-07-21, 12:58


Jeey

Lua, Grafik






Wiek: 27
Na forum: 4339 dni
Posty: 98
Nick w MP: Jeey

Piwa: 383

Respekt: 80

Ostrzeżeń: 100%
ale wklei?em te eventy do tego kodu i nie dzia?aja nie daje np. broni

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-07-21, 17:22


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4394 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

Poka? obecny kod.

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Tagi: 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 » 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