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

Wysłany: 2014-09-29, 15:24


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4470 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

witam tak jak w temacie o co chodzi ?

GUIEditor = {
    tab = {},
    tabpanel = {},
    label = {},
    button = {},
    window = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
    function()
        GUIEditor.window[1] = guiCreateWindow(519, 290, 961, 209, "Panel Pojazdu", false)
        guiWindowSetSizable(GUIEditor.window[1], false)

        GUIEditor.button[1] = guiCreateButton(14, 37, 175, 45, "Silnik", false, GUIEditor.window[1])
        GUIEditor.button[2] = guiCreateButton(199, 37, 175, 45, "?wiat?a", false, GUIEditor.window[1])
        GUIEditor.button[3] = guiCreateButton(776, 154, 175, 45, "Zniszcz Pojazd", false, GUIEditor.window[1])
        GUIEditor.tabpanel[1] = guiCreateTabPanel(727, 25, 214, 80, false, GUIEditor.window[1])

        GUIEditor.tab[1] = guiCreateTab("Zniszcz Pojazd", GUIEditor.tabpanel[1])

        GUIEditor.label[1] = guiCreateLabel(5, 5, 199, 40, "Zniszcz Pojazd (chwilowo nie dzia?a)", false, GUIEditor.tab[1])
        guiLabelSetHorizontalAlign(GUIEditor.label[1], "left", true)


        GUIEditor.window[2] = guiCreateWindow(519, 290, 961, 209, "Panel Pojazdu", false)
        guiWindowSetSizable(GUIEditor.window[2], false)    
    end
)

function Lights ( player ) 
car = getPedOccupiedVehicle ( player ) 
if ( car ) then 
if not vehicleLights[ car ] then 
setVehicleOverrideLights ( car, 2 ) 
outputChatBox("?wiat?a auta zosta?y w??czone.",player, 102, 255, 51, true ) 
vehicleLights[ car ]=true 
else 
outputChatBox("?wiat?a auta zosta?y wy??czone.",player, 102, 255, 51, true ) 
setVehicleOverrideLights ( car, 1 ) 
vehicleLights[ car ]=false 
end 
end



function okno()
local vehicle = getPedOccupiedVehicle (getLocalPlayer())
    if (guiGetVisible(okno)) then
        showCursor(false)
        guiSetVisible(okno,false)
    else
        if isCursorShowing() then return end
        if vehicle and getVehicleController(vehicle) == getLocalPlayer() then
        showCursor(true)
        guiSetVisible(okno,true)
    end
    end
end
bindKey ( "LSHIFT" , "up" , okno )


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-09-29, 15:35


Artysta

Lua, Lua, Czekolada






Wiek: 28
Na forum: 4607 dni
Posty: 240
Nick w MP: Artysta/Koojot

Piwa: 1427

Respekt: 205,8
Respekt: 205,8Respekt: 205,8

Sk?d Ci si? wzi??o
guiSetVisible(okno,true)


Skoro twoje okno si? nazywa GUIEditor.window[1] ?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-09-29, 20:38


MeeShuffle

Programista/Grafik






Wiek: 33
Na forum: 4535 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8578

Respekt: 535,3
Respekt: 535,3

Spr?buj:


GUIEditor = {
    tab = {},
    tabpanel = {},
    label = {},
    button = {},
    window = {}
}

        GUIEditor.window[1] = guiCreateWindow(519, 290, 961, 209, "Panel Pojazdu", false)
        guiWindowSetSizable(GUIEditor.window[1], false)

        GUIEditor.button[1] = guiCreateButton(14, 37, 175, 45, "Silnik", false, GUIEditor.window[1])
        GUIEditor.button[2] = guiCreateButton(199, 37, 175, 45, "?wiat?a", false, GUIEditor.window[1])
        GUIEditor.button[3] = guiCreateButton(776, 154, 175, 45, "Zniszcz Pojazd", false, GUIEditor.window[1])
        GUIEditor.tabpanel[1] = guiCreateTabPanel(727, 25, 214, 80, false, GUIEditor.window[1])

        GUIEditor.tab[1] = guiCreateTab("Zniszcz Pojazd", GUIEditor.tabpanel[1])

        GUIEditor.label[1] = guiCreateLabel(5, 5, 199, 40, "Zniszcz Pojazd (chwilowo nie dzia?a)", false, GUIEditor.tab[1])
        guiLabelSetHorizontalAlign(GUIEditor.label[1], "left", true)


        GUIEditor.window[2] = guiCreateWindow(519, 290, 961, 209, "Panel Pojazdu", false)
        guiWindowSetSizable(GUIEditor.window[2], false)    

function Lights ( player ) 
car = getPedOccupiedVehicle ( player ) 
if ( car ) then 
if not vehicleLights[ car ] then 
setVehicleOverrideLights ( car, 2 ) 
outputChatBox("?wiat?a auta zosta?y w??czone.",player, 102, 255, 51, true ) 
vehicleLights[ car ]=true 
else 
outputChatBox("?wiat?a auta zosta?y wy??czone.",player, 102, 255, 51, true ) 
setVehicleOverrideLights ( car, 1 ) 
vehicleLights[ car ]=false 
end 
end



function okno()
local vehicle = getPedOccupiedVehicle (getLocalPlayer())
    if (guiGetVisible(GUIEditor.window[1])) then
        showCursor(false)
        guiSetVisible(GUIEditor.window[1],false)
    else
        if isCursorShowing() then return end
        if vehicle and getVehicleController(vehicle) == getLocalPlayer() then
        showCursor(true)
        guiSetVisible(GUIEditor.window[1],true)
    end
    end
end
bindKey ( "LSHIFT" , "up" , okno )


Podpis

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

 
Wysłany: 2014-09-30, 14:04


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4470 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

Panie Suffle
mam taki kod i dalej nie dzia?a :
GUIEditor = {
    tab = {},
    tabpanel = {},
    label = {},
    button = {},
    window = {}
}

        GUIEditor.window[1] = guiCreateWindow(519, 290, 961, 209, "Panel Pojazdu", false)
        guiWindowSetSizable(GUIEditor.window[1], false)

        GUIEditor.button[1] = guiCreateButton(14, 37, 175, 45, "Silnik", false, GUIEditor.window[1])
        GUIEditor.button[2] = guiCreateButton(199, 37, 175, 45, "?wiat?a", false, GUIEditor.window[1])
        GUIEditor.button[3] = guiCreateButton(776, 154, 175, 45, "Zniszcz Pojazd", false, GUIEditor.window[1])
        GUIEditor.tabpanel[1] = guiCreateTabPanel(727, 25, 214, 80, false, GUIEditor.window[1])

        GUIEditor.tab[1] = guiCreateTab("Zniszcz Pojazd", GUIEditor.tabpanel[1])

        GUIEditor.label[1] = guiCreateLabel(5, 5, 199, 40, "Zniszcz Pojazd (chwilowo nie dzia?a)", false, GUIEditor.tab[1])
        guiLabelSetHorizontalAlign(GUIEditor.label[1], "left", true)


        GUIEditor.window[2] = guiCreateWindow(519, 290, 961, 209, "Panel Pojazdu", false)
        guiWindowSetSizable(GUIEditor.window[2], false)    






function Engine ()
car = getPedOccupiedVehicle ( player )
if ( car ) then
if not vehicleEngine[ car ] then
setVehicleOverriedeEngine ( car, 2 )
outputChatBox("Silnik w poje?dzie zosta? w??czony.",player, 102, 255, 51, true )
vehicleEngine[ car ]=true
else
outputChatBox("Silnik w poje?dzie zosta? wy??czony.",player, 102, 255, 51, true )
setVehicleOverriedeEngie ( car, 1 )
vehicleEngine[ car ]=false
end
end





function Lights ( player ) 
car = getPedOccupiedVehicle ( player ) 
if ( car ) then 
if not vehicleLights[ car ] then 
setVehicleOverrideLights ( car, 2 ) 
outputChatBox("?wiat?a auta zosta?y w??czone.",player, 102, 255, 51, true ) 
vehicleLights[ car ]=true 
else 
outputChatBox("?wiat?a auta zosta?y wy??czone.",player, 102, 255, 51, true ) 
setVehicleOverrideLights ( car, 1 ) 
vehicleLights[ car ]=false 
end 
end








function okno()
local vehicle = getPedOccupiedVehicle (getLocalPlayer())
    if (guiGetVisible(GUIEditor.window[1])) then
        showCursor(false)
        guiSetVisible(GUIEditor.window[1],false)
    else
        if isCursorShowing() then return end
        if vehicle and getVehicleController(vehicle) == getLocalPlayer() then
        showCursor(true)
        guiSetVisible(GUIEditor.window[1],true)
    end
    end
end
bindKey ( "LSHIFT" , "up" , okno )


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-09-30, 15:33


Dixers

No-Life






Wiek: 26
Na forum: 4453 dni
Posty: 549
Nick w MP: Dixers

Piwa: 412

Respekt: 56,8

AstroStudio, jakie? db3? Po jakiej da?e? stronie? Serwer? Client?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-09-30, 18:06


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4470 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

Dalem po Client

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-09-30, 18:51


Dixers

No-Life






Wiek: 26
Na forum: 4453 dni
Posty: 549
Nick w MP: Dixers

Piwa: 412

Respekt: 56,8

AstroStudio, okej, dobrze. A jest jakie? db3? ( /debugscript 3 ).

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-09-30, 18:55


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4470 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

jest

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-09-30, 19:01


TheTroll

Pan Majster






Wiek: 39
Na forum: 4905 dni
Posty: 219
Nick w MP: TheTroll

Piwa: 1117

Respekt: 120
Respekt: 120

To podaj b??dy kt?re wyskakuj? w debugscript 3.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-09-30, 19:32


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4470 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

a jak moge skopiowac te db 3 ?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-09-30, 20:01


Dixers

No-Life






Wiek: 26
Na forum: 4453 dni
Posty: 549
Nick w MP: Dixers

Piwa: 412

Respekt: 56,8

AstroStudio, zr?b ss'a, albo przepisz.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-09-30, 20:17


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4470 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-09-30, 20:32


Dixers

No-Life






Wiek: 26
Na forum: 4453 dni
Posty: 549
Nick w MP: Dixers

Piwa: 412

Respekt: 56,8

Sprawd?:

GUIEditor = {
    tab = {},
    tabpanel = {},
    label = {},
    button = {},
    window = {}
}

        GUIEditor.window[1] = guiCreateWindow(519, 290, 961, 209, "Panel Pojazdu", false)
        guiWindowSetSizable(GUIEditor.window[1], false)

        GUIEditor.button[1] = guiCreateButton(14, 37, 175, 45, "Silnik", false, GUIEditor.window[1])
        GUIEditor.button[2] = guiCreateButton(199, 37, 175, 45, "?wiat?a", false, GUIEditor.window[1])
        GUIEditor.button[3] = guiCreateButton(776, 154, 175, 45, "Zniszcz Pojazd", false, GUIEditor.window[1])
        GUIEditor.tabpanel[1] = guiCreateTabPanel(727, 25, 214, 80, false, GUIEditor.window[1])

        GUIEditor.tab[1] = guiCreateTab("Zniszcz Pojazd", GUIEditor.tabpanel[1])

        GUIEditor.label[1] = guiCreateLabel(5, 5, 199, 40, "Zniszcz Pojazd (chwilowo nie dzia?a)", false, GUIEditor.tab[1])
        guiLabelSetHorizontalAlign(GUIEditor.label[1], "left", true)


        GUIEditor.window[2] = guiCreateWindow(519, 290, 961, 209, "Panel Pojazdu", false)
        guiWindowSetSizable(GUIEditor.window[2], false)    






function Engine ()
car = getPedOccupiedVehicle ( player )
if ( car ) then
if not vehicleEngine[ car ] then
setVehicleOverriedeEngine ( car, 2 )
outputChatBox("Silnik w poje?dzie zosta? w??czony.",player, 102, 255, 51, true )
vehicleEngine[ car ]=true
else
outputChatBox("Silnik w poje?dzie zosta? wy??czony.",player, 102, 255, 51, true )
setVehicleOverriedeEngie ( car, 1 )
vehicleEngine[ car ]=false
end
end
end




function Lights ( player ) 
car = getPedOccupiedVehicle ( player ) 
if ( car ) then 
if not vehicleLights[ car ] then 
setVehicleOverrideLights ( car, 2 ) 
outputChatBox("?wiat?a auta zosta?y w??czone.",player, 102, 255, 51, true ) 
vehicleLights[ car ]=true 
else 
outputChatBox("?wiat?a auta zosta?y wy??czone.",player, 102, 255, 51, true ) 
setVehicleOverrideLights ( car, 1 ) 
vehicleLights[ car ]=false 
end 
end
end







function okno()
local vehicle = getPedOccupiedVehicle (getLocalPlayer())
    if (guiGetVisible(GUIEditor.window[1])) then
        showCursor(false)
        guiSetVisible(GUIEditor.window[1],false)
    else
        if isCursorShowing() then return end
        if vehicle and getVehicleController(vehicle) == getLocalPlayer() then
        showCursor(true)
        guiSetVisible(GUIEditor.window[1],true)
    end
    end
    end
    
bindKey ( "LSHIFT" , "up" , okno )


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-09-30, 20:35


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4470 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

Dzia?a panel ale nie dziala silnik , swiatla

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-09-30, 20:41


Dixers

No-Life






Wiek: 26
Na forum: 4453 dni
Posty: 549
Nick w MP: Dixers

Piwa: 412

Respekt: 56,8

Silnik:

function silnik()
localVehicle = getPedOccupiedVehicle ( getLocalPlayer() )    
if source == silnik and ( localVehicle ) then
if ( getVehicleEngineState ( localVehicle ) ~= false ) then
setVehicleEngineState ( localVehicle, false )
else
setVehicleEngineState ( localVehicle, true )
      end
  end
end

addEventHandler("onClientGUIClick",root, silnik)


?wiat?a:

function lampy ()
    localVehicle = getPedOccupiedVehicle ( getLocalPlayer() )       
    if source == lampy and ( localVehicle ) then                                        
        if ( getVehicleOverrideLights ( localVehicle ) ~= 2 ) then  
            setVehicleOverrideLights ( localVehicle, 2 )           
        else
            setVehicleOverrideLights ( localVehicle, 1 )            
        end
    end
end
addEventHandler("onClientGUIClick",root, lampy )


[ Dodano: 2014-09-30, 20:41 ]
Licz? na piwka :)

[ Dodano: 2014-09-30, 20:43 ]
Masz ca?o?? i sprawd?:

GUIEditor = {
    tab = {},
    tabpanel = {},
    label = {},
    button = {},
    window = {}
}

        GUIEditor.window[1] = guiCreateWindow(519, 290, 961, 209, "Panel Pojazdu", false)
        guiWindowSetSizable(GUIEditor.window[1], false)

        silnik = guiCreateButton(14, 37, 175, 45, "Silnik", false, GUIEditor.window[1])
        lampy = guiCreateButton(199, 37, 175, 45, "?wiat?a", false, GUIEditor.window[1])
        GUIEditor.button[3] = guiCreateButton(776, 154, 175, 45, "Zniszcz Pojazd", false, GUIEditor.window[1])
        GUIEditor.tabpanel[1] = guiCreateTabPanel(727, 25, 214, 80, false, GUIEditor.window[1])

        GUIEditor.tab[1] = guiCreateTab("Zniszcz Pojazd", GUIEditor.tabpanel[1])

        GUIEditor.label[1] = guiCreateLabel(5, 5, 199, 40, "Zniszcz Pojazd (chwilowo nie dzia?a)", false, GUIEditor.tab[1])
        guiLabelSetHorizontalAlign(GUIEditor.label[1], "left", true)


        GUIEditor.window[2] = guiCreateWindow(519, 290, 961, 209, "Panel Pojazdu", false)
        guiWindowSetSizable(GUIEditor.window[2], false)    





function silnik()
localVehicle = getPedOccupiedVehicle ( getLocalPlayer() )    
if source == silnik and ( localVehicle ) then
if ( getVehicleEngineState ( localVehicle ) ~= false ) then
setVehicleEngineState ( localVehicle, false )
else
setVehicleEngineState ( localVehicle, true )
      end
  end
end

addEventHandler("onClientGUIClick",root, silnik)




function lampy ()
    localVehicle = getPedOccupiedVehicle ( getLocalPlayer() )       
    if source == lampy and ( localVehicle ) then                                        
        if ( getVehicleOverrideLights ( localVehicle ) ~= 2 ) then  
            setVehicleOverrideLights ( localVehicle, 2 )           
        else
            setVehicleOverrideLights ( localVehicle, 1 )            
        end
    end
end
addEventHandler("onClientGUIClick",root, lampy )






function okno()
local vehicle = getPedOccupiedVehicle (getLocalPlayer())
    if (guiGetVisible(GUIEditor.window[1])) then
        showCursor(false)
        guiSetVisible(GUIEditor.window[1],false)
    else
        if isCursorShowing() then return end
        if vehicle and getVehicleController(vehicle) == getLocalPlayer() then
        showCursor(true)
        guiSetVisible(GUIEditor.window[1],true)
    end
    end
    end
    
bindKey ( "LSHIFT" , "up" , okno )


Licze na piwka :D

Postaw piwo autorowi tego posta
 

 
Tagi: potocy :: okno :: sie :: nie :: otwiera
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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