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

Wysłany: 2015-11-11, 15:56


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4330 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

Witam mam problem z frakcjami gui



local frakcjamarker createMarker(-2013.81,761.32,44.60"cylinder"525111,25,25)
okno guiCreateWindow(381296515144"PANEL LOGOWANIA FRAKCJI"false)
sfpd  guiCreateButton(92616148"SFPD"falseokno)
sfmc  guiCreateButton(1762616148"SFMC"falseokno)
sffd  guiCreateButton(3452616048"SFFD"falseokno)
wyloguj  guiCreateButton(3458416047"WYLOGUJ"falseokno)
zamknij  guiCreateButton(108716047"ZAMKNIJ"falseokno)

guiSetVisible(sfpdfalse)
guiSetVisible(sfmcfalse)
guiSetVisible(sffdfalse)
guiSetVisible(wylogujfalse)
guiSetVisible(zamknijfalse)
guiSetVisible(oknofalse)

addEventHandler("onClientGUIClick"zamknij,
 function(elmd)
    if el ~= localPlayer then return end
    if guiGetVisible(okno)  == true then
        guiSetVisible(sfpdfalse)
        guiSetVisible(sfmcfalse)
        guiSetVisible(sffdfalse)
        guiSetVisible(wylogujfalse)
        showCursor(false) 
    end
end
)

addEventHandler('onClientMarkerHit'frakcjamarker, function()
            guiSetVisible(sffdtrue)
            guiSetVisible(sfmctrue)
            guiSetVisible(sfpdtrue)
            guiSetVisible(wylogujtrue)
            showCursor(true)
            guiSetVisible(zamknijtrue)
            guiSetVisible(oknotrue)
            
end)


function Policja thePlayer local playerName getAccountName getPlayerAccount thePlayer ) ) 
if isObjectInACLGroup "user." .. playerNameaclGetGroup "Policja" ) ) then 
setPlayerTeam thePlayerpoliteamx giveWeapon thePlayer225000 setElementModel thePlayer282 setElementPosition thePlayer, -2014.43,780.85,45.45) 
else 
outputChatBox"Nie jestes pracownikiem SFPD"thePlayer0100255falseend 
end 
addEventHandler("onClientGUIClick",sfpd,Policja)

function Pogotowie thePlayer local playerName getAccountName getPlayerAccount thePlayer ) ) 
if isObjectInACLGroup "user." .. playerNameaclGetGroup "Pogotowie" ) ) then 
setPlayerTeam thePlayerpogoteamx )  
setElementModel thePlayer275 setElementPosition thePlayer, -318.97,1048.24,20.34) 
else 
outputChatBox"Nie jestes pracownikiem SFMC"thePlayer0100255falseend 
end 
addCommandHandler "loginfcmc"Pogotowie )


function Straz thePlayer local playerName getAccountName getPlayerAccount thePlayer ) ) 
if isObjectInACLGroup "user." .. playerNameaclGetGroup "Straz" ) ) then 
setPlayerTeam thePlayerstrazteamx )  
setElementModel thePlayer277 giveWeapon thePlayer42)
setElementPosition thePlayer22.87,1370.73,9.25) 
else 
outputChatBox"Nie jestes pracownikiem SFFD"thePlayer0100255falseend 
end 
addCommandHandler "loginfcfd"Straz )

jezeli klikam w GUI ( same okno ) lub w SFPD to mam takie db
DB3 :
linijka 43 attemp to call global 'getPlayerAccount' (a nil value)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-11-11, 16:19


Tostuch







Wiek: 27
Na forum: 4931 dni
Posty: 483
Nick w MP: Tost

Piwa: 137

Respekt: 110
Respekt: 110

Funkcja ta dzia?a tylko po stronie serwera.

Postaw piwo autorowi tego posta
 

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