Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: gui
241. Gui
Witam chce zrobi? tak ze jak w Mysql/Ogrpg-vehicle Mam linike neon To ?e jak wjade w marker to wpisze sie kom?da na neona (Kt?ra ju? zrobi?em) A jak ktos wjedze bez to zeby nic sie nie robi?o

Zale?y mi na tym, Za pomoc dam R* i :piwo:
242. GUI v2
Siemanko , tutaj z tej strony JA ! Wiecie mam problem bo ogolem to wsztsko dziala
jak wyglada skrypt ze sie wchodzi w marker i sie klika i jest 1 problem
bo jak wylacza si? gui np. ja wy??czam wiecie kliam i znika m igui jest spoko
tylko proble mze , problem ze mojemu ziomkowi co klika cos tam to jemu tez sie wylacza

co chcialbym

function inacz7()
if 
source ~= Koniec then return end 
            guiSetVisible
(punkt3false)
            
showCursor(false)
end
addEventHandler 
"onClientGUIClick"rootinacz7)

zeby jak np. jak ja klikne t ozeby mi znika?o a moejmu ziomkowi co jest w markerze nie znika?o
243. Najechanie na gui
Witam!

Mam problem, ju? t?umacz? o co chodzi.

Chcia?bym zrobi? panel logowania, i gdy najad? na pewien element myszk?, chc? ?eby co? si? sta?o (np. odtworzy? si? d?wi?k). Problem w tym ?e nie znam na to odpowiedniej funkcji/zdarzenia.

Jak by kto? m?g? pom?c/da? linka do wiki to by?bym bardzo wdzi?czny :)



P.S. Nie chodzi mi o onClientGUIClick :)
244. panel gui
Witam m?g?by pro?ci o funkcje na panel GUI + jak doda? jak?? np przycisk np mandat. Z g?ry dzi?kuj?
245. Nie wyświetla się GUI po wejściu w marker oraz wytłumaczenie
Witam wszystkich! Zrobi?em sobie mini skrypt na panel SAPD. Kiedy wejd? w marker nie pokazuj? si? GUI. Oto kod:

[lua]local GUI_START = createMarker (-212.72344970703, 979.70648193359, 19.329460144043, 'checkpoint', 1, 255, 54, 24, 255)

local Panel = guiCreateWindow(565, 271, 336, 207, "Ekwipunek", false)
guiWindowSetSizable(Panel, false)

local AddKamizelka = guiCreateButton(9, 31, 137, 67, "Kamizelka", false, Panel)
local AddUSPs = guiCreateButton(207, 36, 119, 62, "USP-S", false, Panel)
local AddM4A1S = guiCreateButton(9, 121, 137, 76, "M4A1-S", false, Panel)
local AddAK47 = guiCreateButton(203, 116, 123, 81, "AK-47", false, Panel)

function Open_panel (thePlayer)
guiWindowSetSizable(Panel, true)
guiSetVisible (Addkamizelka, true)
guiSetVisible (AddUSPs, true)
guiSetVisible (AddM4A1S, true)
guiSetVisible (AddAK47, true)
showCursor (true)
end
addEventHandler ("onClientMarkerHit", GUI_START, open_panel)

function Close_panel (thePlayer)
guiWindowSetSizable(Panel, false)
guiSetVisible (Addkamizelka, false)
guiSetVisible (AddUSPs, false)
guiSetVisible (AddM4A1S, false)
guiSetVisible (AddAK47, false)
showCursor (false)
end
addEventHandler ("onClientMarkerLeave", GUI_START, Close_panel)
[/lua]

I po jakiej stronie to ustawi?? Kiedy w mecie wpisz? client to po uruchomieniu skryptu mam to GUI nie b?d?c w markerze i ...
246. GUI
Witam, mam problem z GUI. A konkretnie po wgraniu mojego GUI zostaj? r?wnie? stare i te dwa GUI si? nak?adaj?. (chodzi mi o gui w prawy g?rym rogu HP,kasa itp) Co zrobi? ?eby zosta?o tylko moje GUi bez tego podstawowego ?
247. gui
jak naciskam button , nie znika mi gui .
[lua]
addEventHandler("onClientResourceStart", root, function()
punkt3 = guiCreateTabPanel(254, 92, 1106, 650, false)
guiSetVisible(punkt3,false)
glock = guiCreateTab("Glock i inne", punkt3)
guiWindowSetSizable(punkt3, false)
Lastrike = guiCreateButton(10, 66, 99, 35, "", false, punkt3)
guiSetVisible(punkt3,false)
end
)

local marker = createMarker(1658.44641, -1691.38037, 15.60938, "cylinder")

addEventHandler("onClientMarkerHit", marker,
function(hitElement, md)
if hitElement ~= localPlayer then return end
if not md then return end
if source ~= marker then return end
guiSetVisible(punkt3, true)
showCursor(true, false)
end)

function getElementsWithinMarker(marker)
if (not isElement(marker) or getElementType(marker) ~= "marker") then
return false
end
local markerColShape = getElementColShape(marker)
local elements = getElementsWithinColShape(markerColShape)
return elements
end

function podmien()
if source == Lastrike then
if isElementWithinMarker(localPlayer, marker) then
triggerServerEvent ("serverSide" , localPlayer)
outputChatBox("Zakup" ..#ff0000.. "Udany")
dff = engineLoadDFF ( "colt45.dff", 346 )
engineReplaceModel ( dff, 346 )
...
248. Dodawanie do acl przez gui
Witam mam problem mam gotow? stron? clienta panelu dodawania ale jak mog? wys?a? zmienn? nick na stron? serwera a potem u?y? tej zmiennej do funcji acl? Prosz? o pomoc
Ps. wiem ?e chodzi o funkcj? triggerServerEvent ale co mi po tym jak nie wiem w jaki spos?b u?y? tej funkcji.
249. Nie znika gui
Po nacisnieciu tego buttona nie znika gui , pomuszcie .

function podmien()
            if 
isElementWithinMarker(localPlayermarkerthen
            dff 
engineLoadDFF "qbz951.dff"355 )
            
engineReplaceModel dff355 )
            
txd engineLoadTXD "qbz951.txd" )
            
engineImportTXD txd355 )
            
guiSetVisible(napadfalse)
            
showCursor(false)
    
end
end
addEventHandler
("onClientGUIClick"buttakpodmien,false)
250. GUI
Witam, zrobi?em sobie gui do premium ale jak odpalam to mam miliard tych okien zamiast 1
Jak mo?na to naprawi??
KOD:

[lua]local data={ showed=nil, button={}}


local screenW, screenH = guiGetScreenSize()
local sx, sy = guiGetScreenSize()
function isMouseIn(psx,psy,pssx,pssy,abx,aby)
if not isCursorShowing() then return end
cx,cy=getCursorPosition()
cx,cy=cx*sx,cy*sy
if cx >= psx and cx <= psx+pssx and cy >= psy and cy <= psy+pssy then
return true,cx,cy
else
return false
end
end


GUIEditor = {
button = {},
window = {},
label = {},
memo = {}
}


function renderZoneBox()
showCursor(true)
GUIEditor.window[1] = guiCreateWindow(478, 233, 924, 553, "Us?uga PREMIUM", false)
guiWindowSetSizable(GUIEditor.window[1], false)

GUIEditor.button[1] = guiCreateButton(41, 450, 212, 87, "Sprawd?", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[2] = guiCreateButton(305, 450, 212, 87, "Zamknij", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA")
GUIEditor.label[1] = guiCreateLabel(285, 22, 919, 97, "Za pomoc? tego formularza mo?esz zakupi? konto premium.n REGULAMIN:nZa b??dne wpisanie numeru lub tre?ci sms nie odp...
251. GUI
Jak wchodz? w marker , nie pokazuje mi si? gui , gdzie le?y problem ?
[lua]
addEventHandler("onClientResourceStart", root, function()
napad = guiCreateWindow(415, 222, 543, 390, "", false)
guiWindowSetSizable(napad, false)
buy = guiCreateButton(38, 108, 105, 33, "Ak47", false, napad)
end)

local marker = createMarker(2295.04639, -1686.69812, 13.62975, "cylinder")

addEventHandler("onClientMarkerHit", marker,
function(hitElement, md)
if hitElement ~= localPlayer then return end
if not md then return end
if source ~= marker then return end
guiSetVisible(napad, true)
showCursor(true, false)
end)

function getElementsWithinMarker(marker)
if (not isElement(marker) or getElementType(marker) ~= "marker") then
return false
end
local markerColShape = getElementColShape(marker)
local elements = getElementsWithinColShape(markerColShape)
return elements
end

function podmien()
if source == buttak then
if isElementWithinMarker(localPlayer, marker) then
dff = engineLoadDFF ( "ak47.dff", 355 )
engineReplaceModel ( dff, 355 )
txd = engineLoadTXD ( "ak47.txd" )
engineImportTXD ( txd, 355 )
if guiGetVisible(napad) == true then
guiSetVisible(napad, false)
showCursor(false)
end
end
end
end
...
252. GUI nie pojawia się lista aut
Witam mam problem dotycz?cej cmd:cars chodzi o to ?e jak wybieram "Komis Janusza" to nie wy?wietla si? a jak bior? inne np motocykle czy reszta to jest
Oto kod http://pastebin.com/vzUhHtbX

Pozdrawiam!
253. Piąte Spotkanie z GUI
Elo , ju? m?wi? co mnie dr?czy .
W Miejsce X gdzie wy?wietla si? GUI i po nacisi?ciu Buttona akceptuj , zmienia gracza pozycje w miejsce Y , [u]tylko ,?e jak gracz wraca w miejsce Y , wy?wietla si? graczowi gui kt?ry jest w miejscu Y [/u],[To podkre?lone to m?j problem] Czyli , chcia?bym aby w miejscu Y , nie wy?wietla?o si? gui , nie chcia?em nic grzeba? czy usuwa? bo p??niej bym pogorszy? spraw? dlatego zwr?ci?em si? do was o pomoc .
[lua]
addEventHandler("onClientResourceStart", root, function()
guiSetVisible(napad, false)
end)
napad = guiCreateWindow(438, 185, 467, 306, "Potwied? Napad na Bank", false)
guiWindowSetSizable(napad, false)
guiSetAlpha(napad, 0.58)
guiSetProperty(napad, "CaptionColour", "FFFEFEFE")
buttonEmpty = guiCreateButton(194, 129, 15, 15, "", false, napad)
buttonAccept = guiCreateButton(20, 233, 119, 52, "Akceptuj?", false, napad)
buttonRefuse = guiCreateButton(317, 234, 140, 61, "Odrzu?", false, napad)

local marker = createMarker(1821.38318, -1683.33215, 13.38281 , "cylinder")

addEventHandler("onClientMarkerHit", marker, function(el, md)
if el ~= localPlayer then return end
if not md then return end
guiSetVisible(napad, true)
showCursor(true, false)
end)

addEventHandler("onClientGUIClick", root, function(btn, state)
if btn == "left" and state == "up" the...
254. Gui i Tigger
To znowu ja . Nie wiem dlaczego ale po w??czeniu skryptu gui si? pojawia :/
I jakby kto? m?g? to niech sprawdzi tiggera czy dobrez go zrobi?em z g?ry dzi?ki :)
S-SIDE

addEventHandler
("onClientMarkerHit"root
function(
hitElement)
    if 
source == marker then
    
if getElementType(hitElement) == "player" then
    local accountName 
getAccountName(getPlayerAccount(source))
    if 
isObjectInACLGroup"user."..accountNameaclGetGroup"SAFD") )  then  
    triggerClientEvent
("pokaz"sourcesource)
    
end
end
end
end
)

C-SIDE

addEvent
("pokaz"true)
addEventHandler("pokaz"root,
function()
    if 
source == getLocalPlayer() then
    
if guiGetVisible(okno)==false then
        guiSetVisible
(oknotrue)
        
showCursor(true)
    
end
end
end
)
255. Czwarte spotkanie z GUI
Elo , mam problem poniewa? zosta?em odes?any do wiki tyle ,?e nic z tego nie rozumiem co tam jest . Dosta?em 2 linki , 1 to o start zasob?w , 2 po do?aczeniu gracza na serwer , tylko ,?e nie wiem jak zrobi? aby GUI , nie wy?wietla?o si? po do?aczeniu na serwer . Powiem szczerze , ?e przypatrywa?em si? tym kodom 1 godz. i naprad? nie rozumia?em , jak mog? je zastosowa? do mojego problemu z g?ry dzi?kuj? .
link. z wiki 1 i 2
https://wiki.multitheftauto.com/wiki/OnClientResourceStart
https://wiki.multitheftauto.com/wiki/OnClientPlayerJoin

Edit:
Jakby potrzebny by? m?j kod z gui , prosz? pisa? , nie wkleja?em go bo wydawa? mi si? zb?dny ale je?li komu? ma pomuc w mojej sprawie, oczywi?cie , udostepni? go .
256. Znów GUI
Elo. Poprawi?em rozmiary win, ale nadal pokazuj? si? przyciski oraz gridlista :(


GUIEditor 
= {
    
gridlist = {},
    
window = {},
    
button = {}
}
addEventHandler("onClientResourceStart"resourceRoot,
    function()
        
win guiCreateWindow(138198567624"Panel Moderatora"false)
        
guiWindowSetSizable(winfalse)
        
guiSetVisible(winfalse)
        
prz1 guiCreateButton(43925914969"Mutuj"false)
        
prz2 guiCreateButton(44235614642"Kick"false)
        
gridlista guiCreateGridList(217249178388false)
        
guiGridListAddColumn(gridlista"Gracze"0.9)    
    
end
)

function 
pokaz()
guiSetVisible(wintrue)
showCursor(true)
end
addCommandHandler
("panel"pokaz)

addEventHandler("onClientGUIClick"root, function(btnstate)
if 
source == prz1 then
triggerServerEvent
("kick"getRootElement())
if 
source == prz2 then
triggerServerEvent
("ban"getRootElement())
end
end
end
)


Ca?y kod.
257. Elementy GUI
Witam mam takie pytanie, pomijaj?c same dzia?anie tych funkcji to czy cokolwiek r??ni np z wygl?du etc DXDrawImage od guiCreateStaticImage ? pomijaj?? to, ?e do dx trzeba onClientRender itd. Jest jaka? r??nica? Czy zosta?o to stworzone tak dla naszych "wymys??w".
258. gui element mark
w sumie jak w temacie, w jaki spos?b wykona? wywo?anie zdarzenia po najechaniu na stworzony obrazek w guieditor

dzieki.
259. Trzecie spotkanie z GUI
elo mam problem gui wyskakuje mi po wejsciu na serwer + nie wykonuje swoich fukcji
gdy klikam , nie teleportuje i nie ga?nie gui i kursor . oto kod.
addEventHandler("onClientGUIClick"root, function(btnstate)
 if 
btn == "left" and state == "up" then
   
if source == buttonAccept then
      setElementPosition
(elementy,2143.238041547.5225810.82031)
      
guiSetVisible(napadfalse)
      
showCursor(false)
   
end
260. drugie spotkanie z GUI
Elo , mam kod , tylko nie wiem jak odpowiednim buttonom , dac funkcj? , pierw dam 2 kody pierwsze od mojeog skryptu , a pozniej kod z gui .
[lua]
function getElementsWithinMarker(marker)
if (not isElement(marker) or getElementType(marker) ~= "marker") then
return false
end
local markerColShape = getElementColShape(marker)
local elements = getElementsWithinColShape(markerColShape, "player")
return elements
end
local marker = createMarker(1821.38318, -1683.33215, 13.38281 , "cylinder")

function markerHit ()
if not source == marker then return end
local elementy = getElementsWithinMarker(marker)
if #elementy==1 then
for i, v in ipairs (elementy) do
setElementPosition(v,2143.23804, 1547.52258, 10.82031)
end
end
end
addEventHandler( "onMarkerHit", marker, markerHit )[/lua]

teraz gui
[lua]

GUIEditor = {
checkbox = {},
button = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
function()
napad = guiCreateWindow(438, 185, 467, 306, "Potwied? Napad na Bank", false)
guiWindowSetSizable(napad, false)
guiSetAlpha(napad, 0.58)
guiSetProperty(napad, "CaptionColour", "FFFEFEFE")
GUIEditor.button[1] = guiCreateButton(194, 129, 15, 15, "", false, napad)
GUIEditor.button[2] = guiCreateButton(20, 233, 119, 52, "Akceptuj?", ...
261. Pierwsze Spotkanie z GUI
Elo , zrobi?em , swoje pierwsze gui , musz? si? pochwali?


i pytanie , co dalej mam to zapisa? tylko jak ? zielony jestem w tym i mam pytanie , pozniej gdzie kod mog? znale?? ?
Wiem ,?e pewnie si? ?miejecie ale pierwszy raz pracuje z GUI , licz? na wyrozumia?o?c i cierpliwo?? : )
262. gui
witam, mam problem, poniewa? gdy klikam na gui to buttony wyskakuj? za gui. jak mam zrobi?, ?e jak b?de klika? na gui to buttony mi nie b?d? przechodzi?y za gui?
263. GUI
No wi?c tak, po przeczytaniu poradnika gui, stwierdzi?em ?e spr?buj? sam napisa? jaki? skrypt, jednak po napisaniu go i odpaleniu mam errory :(
Stawiam piwka za pomoc :piwo:

KODZIK:
[lua]GUIEditor = {
button = {},
window = {},
staticimage = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
function()
GUIEditor.window[1] = guiCreateWindow(24, 184, 145, 294, "Policja", false)
guiWindowSetSizable(GUIEditor.window[1], false)
guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF0A1BF4")

GUIEditor.button[1] = guiCreateButton(10, 61, 125, 74, "Rozpocznij prac?", false, GUIEditor.window[1])
GUIEditor.staticimage[1] = guiCreateStaticImage(10, 145, 125, 139, ":DB/images/examples/odznaka.png", false, GUIEditor.window[1])


GUIEditor.button[2] = guiCreateButton(134, 217, 21, 20, "X", false)


GUIEditor.staticimage[2] = guiCreateStaticImage(68, 374, 2, 2, ":DB/images/examples/odznaka.png", false)
end
)

pu = createPickup( -1615.37024, 685.64209, 7.18750, 4, 1275 )

function sg()
guiSetVisible(GUIEditor.window[1], true)
guiSetVisible(GUIEditor.button[1], true)
guiSetVisible(GUIEditor.staticimage[2], true)
guiSetVisible(GUIEditor.button[2], true)
end

addEventHandler ("onClientPickupHit",pu,sg)

function hg()
guiSetVisible(GUIEditor.window[1], false)
guiSetVisible(GUIE...
264. GUI włączanie i wyłączanie na ten sam klawisz.
Witam, mam kolejny problem, ot?? nie wiem jak sprawi? ?eby GUI w??cza?o i wy??cza?o si? na ten sam klawisz. Prosze o pomoc
Kod:
Kod:

function pokaz ()
guiSetVisible(GUIEditor.window[1], true)
guiSetVisible(GUIEditor.gridlist[1], true)
showCursor(true)
end
bindKey("F2","down", pokaz)

function zamknij ()
guiSetVisible(GUIEditor.window[1], false)
guiSetVisible(GUIEditor.gridlist[1], false)
showCursor(false)
end
bindKey("F2","down", zamknij)









Za najlepsze odpowiedzi :piwo:
265. Gui
Witam wczoraj zrobi?em sobie gui i teraz musze napisa? funkcje ?eby zmienia?o skina

kod:
 GUIEditor = {
    
button = {},
    
window = {}
}
addEventHandler("onClientResourceStart"resourceRoot,
    function()
        
GUIEditor.window[1] = guiCreateWindow(838223414361"Przebieralnia PSP"false)
        
guiWindowSetSizable(GUIEditor.window[1], false)
        
guiSetProperty(GUIEditor.window[1], "CaptionColour""FF677DEC")

        
GUIEditor.button[1] = guiCreateButton(184314156"Koszarowy"falseGUIEditor.window[1])
        
GUIEditor.button[2] = guiCreateButton(1810914156"Bojowy"falseGUIEditor.window[1])
        
GUIEditor.button[3] = guiCreateButton(1817514156"Bojowy AODO"falseGUIEditor.window[1])
        
GUIEditor.button[4] = guiCreateButton(19410914156"Ratownik Medyczny"falseGUIEditor.window[1])
        
GUIEditor.button[5] = guiCreateButton(1944314156"Lekarz"falseGUIEditor.window[1])
        
GUIEditor.button[6] = guiCreateButton(19417514156"Zwykly"falseGUIEditor.window[1])    
    
end


[ Dodano: 2016-06-26, 17:42 ]
Ale nie wiem jak sie zabra? do pisania funkcji :C

[ Komentarz dodany przez: AteX: 2016-06-26, 18:44 ]
Stosuj znaczniki LUA
266. Gui się nie wyświtla ;(
Witam spo?eczno?? gtao . Mam do was pytanko dlaczego gui si? nie pojawia po wejsciu w pickup ? :(
Kod :
C-SIDE
[lua]
GUIEditor = {
gridlist = {},
window = {},
button = {}
}
poli = guiCreateWindow(922, 381, 395, 476, "Panel Policji", false)
guiWindowSetSizable(poli, false)
guiSetProperty(poli, "CaptionColour", "FF0BFD00")

gridlist[1] = guiCreateGridList(45, 48, 137, 144, false, poli)
guiGridListAddColumn(gridlist[1], "Skin", 0.9)
for i = 1, 4 do
guiGridListAddRow(gridlist[1])
end
guiGridListSetItemText(gridlist[1], 0, 1, "Skin 1", false, false)
guiGridListSetItemColor(gridlist[1], 0, 1, 59, 253, 0, 255)
guiGridListSetItemText(gridlist[1], 1, 1, "Skin 2", false, false)
guiGridListSetItemColor(gridlist[1], 1, 1, 11, 253, 0, 255)
guiGridListSetItemText(gridlist[1], 2, 1, "Skin 3", false, false)
guiGridListSetItemColor(gridlist[1], 2, 1, 11, 253, 0, 255)
guiGridListSetItemText(gridlist[1], 3, 1, "Skin 4", false, false)
guiGridListSetItemColor(gridlist[1], 3, 1, 11, 253, 0, 255)
button[1] = guiCreateButton(192, 137, 183, 86, "We? Bro?/Przedmiot", false, poli)
guiSetFont(button[1], "default-bold-small")
guiSetProperty(button[1], "NormalTextColour", "FF05FD00")
button[2] = guiCreateButton(192, 263, 181, 85, "Zaloguj", false, poli)
guiSetFont(button[2], "default-bold-small")
guiSetProperty(button[2],...
267. Logowanie do frakcji przez gui
Cze??. Ostatnio bawi? si? z GUI. Gdy w??czam ten skrypty 0 b??d?w w DB3, ale gdy wejde i klikne zaloguj to jest b??d w 43 linijce.

[lua]
marker = createMarker (-2128, -29.88, 35, "cylinder", 1.5, 255, 255, 255, 170 )



local wm={}
sx,sy=guiGetScreenSize()
mojeW, mojeH = 1280, 1024
GUI = guiCreateWindow(0/mojeW*sx, 435/mojeH*sy, 232/mojeW*sx, 203/mojeH*sy, "Logowanie", false)
guiWindowSetSizable(GUI, false)
guiSetVisible(GUI, false)

przycisk1 = guiCreateButton(15/mojeW*sx, 52/mojeH*sy, 205/mojeW*sx, 52/mojeH*sy, "Zaloguj", false, GUI)


-- pokaz gui

addEventHandler("onClientMarkerHit", marker, function(el,md) -- gdy wejdziemy w marker2 pojawia nam si? gui
if el~=localPlayer then return end
if not guiGetVisible(GUI) then
showCursor(true,false)
guiSetVisible(GUI,true)
end
end)

------------------------------------------------------


--schowaj gui

addEventHandler("onClientMarkerLeave", marker, function(el,md) -- gdy wyjdziemy z marker2 chowa nam si? gui
if el~=localPlayer then return end
if guiGetVisible(GUI) then
showCursor(false)
guiSetVisible(GUI, false)
end
end)

-------------------------------------------------------------------------------------

--logowanie
addEventHandler("onClientGUIClick", przycisk1, function(el,md) -- po nacisni?ciu przycisku wm.przycisk1 otwieramy nasz? bram?
if isObjectInACLGroup ("user."..login, aclGet...
268. Brama na gui coś źle
[lua]
GUIEditor = {
button = {},
window = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
function()
GUIEditor.window[1] = guiCreateWindow(329, 282, 362, 383, "", false)
guiWindowSetSizable(GUIEditor.window[1], false)
guiSetVisible(GUIEditor.window[1], false)
guiCreateButton[1] = guiCreateButton(67, 77, 234, 99, "Otworz Brame", false, GUIEditor.window[1])
guiCreateButton[1] = guiCreateButton(65, 233, 236, 90, "Zamknij brame", false, GUIEditor.window[1])
end
)

--marker i brama

marker = createMarker(-1536, 480, 7.18, 'cylinder', 1.0, 255, 0, 0, 255)

brama1 = createObject(969, -1534.4000244141, 482.29998779297, 6.1999998092651, 0, 0)

-- pokaz gui

function hit( hitPlayer, matchingDimension )
if hitPlayer ~= localPlayer then return end
showCursor(true,false)
guiSetVisible(GUIEditor.window[1], true)
end
addEventHandler("onClientMarkerHit", marker, hit)

------------------------------------------------------


--schowaj gui

function hit( hitPlayer, matchingDimension )
if hitPlayer ~= localPlayer then return end
showCursor(false,false)
guiSetVisible(GUIEditor.window[1], false)
end
addEventHandler("onClientMarkerLeave", marker, hit)

-------------------------------------------------------------------------------------

--Otwieranie:
addEventHandler("onClientGUIClick", guiCreateButt...
269. Gui create window czy coś takiego ;/
Cze??. M?g?by mi kto? wyt?umaczy? jak to dzia?a, jak si? robi?
270. SkinShop GUI i kursor
Witam chc? aby Gui i kursor pokaza?y si? po wej?ciu w marker, lecz nic nie wida?, zero b??d?w tak samo w debugscript.

Server:
[spoiler]
[lua]
local markerKupnaSkina = createMarker(161.30000305176, -83.900001525879, 1000.799987793, "cylinder", 1, 0,0,255,255)

function TeleportDoSkinShop(player)
if getElementType(player)=="player" then
if source == wejscie then
setElementPosition(player, 161.60000610352, -95.699996948242, 1001.799987793)
setElementInterior(player, 18)
setElementInterior(wyjscie, 18)
setElementInterior(sprzedawca, 18)
setElementInterior(markerKupnaSkina, 18)
setElementFrozen(player, true)
setTimer(setElementFrozen,30000,1,player,false)
end
end
end
addEventHandler("onMarkerHit", wejscie, TeleportDoSkinShop)

function WybierzSkina(player)
if getElementType(player)=="player" then
if source == markerKupnaSkina then
triggerClientEvent(player, "onSkinMarkerHit", player)
triggerClientEvent(player, "onClientResourceStart", player)
end
end
end
addEventHandler("onMarkerHit", markerKupnaSkina, WybierzSkina)

[/lua]
[/spoiler]

Client:
[spoiler]
[lua]
addEvent("onClientResourceStart", true)
addEventHandler("onClientResourceStart", resourceRoot,
function()
gridlist = guiCreateGridList(1350, 383, 236, 293, false)
guiGridListAddColumn(gridlist, "Skiny", 0.5)
guiGridListAddColumn(gridlist,...
271. Chat lokalny i marker z gui
Witam . Mam do was 2 pytania . 1. Podajcie mi funkcje i jak po kolei to zrobi? krok po kroku (jezeli mo?ecie ) , ten chat lokalny . 2. Jak zrobi? marker i jak si? w niego wejdzie to wyswielta sie gui a w nim jaki? tekst :) . Za pomoc wielkie dzi?ki :)
272. GUI element
Witam mam pewien problem, tworz? mapk? z dzielnicami dla frakcji na bind lecz

Mam problem poniewa? po naci?ni?ciu dnaego klawisza gui nie otwiera si?.

function pokaz()
        
okno guiCreateWindow(00796600"Mapa dzielnic"false)
        
guiWindowSetSizable(oknofalse)
        
guiSetAlpha(okno1.00)

        
mapa guiCreateStaticImage(920778571"images/SitzICF.png"falseokno)    
    
end
    
function open()
if 
guiGetVisible(okno) == false then
guiSetVisible
(oknotrue)
else
guiSetVisible(oknofalse)
end
end
bindKey
("n""down""n")
addEvent("tak",true)
addEventHandler("tak",getRootElement(),open)


DB:

WARNING: mapka/client.lua:10: bad argument @ 'guiSetVisible' [expected gui-element at argument 1, got nil]


WARNING: mapka/client.lua:11: bad argument @ 'guiSetVisible' [expected gui-element at argument 1, got nil]

Nie rozumiem dlaczego tak si? dizeje, poniewa? owy argument jst wpisany i jest on poprawny.
273. Poradnik do image w GUI
Witam, ?piesz? z nast?pnym poradnikiem tym razem pokazuj?cy jak wykona? sw?j obrazek w guieditorze.

Jak wiadomo aby stworzy? obrazek u?ywamy [wmta]guiCreateStaticImage[/wmta]

lub
[wmta]dxDrawImage[/wmta]

Lecz robimy to za pomoc? tego

[Klik

W zak?adce create mamy opcj? 'Image' ale aby nasz obrazek na?o?y? najpierw musimy go wgra?.

Wrzucamy nasz obrazek *.png (lub inny format) do naszego folderu z gueieditorem i folderu images

guieditor/images

Nastepnie w folderze guieditor edytujemy mete

Dopisujemy do niej w 'kategorii' image nasz obrazek

[lua]<file src="images/*.png"/>[/lua]

Zamykamy i zapisujemy. Restartujemy guieditor. Widzimy, ?e mamy b??d poniewa? nie mamy dost?pu do funkcji general.ModifyOtherObjects

Tak wi?c dajmy jej uprawnienia. Wchodzimy do panelu admina -> resource -> Manage ACL -> autoGroup_guieditor i wybieramy czerwon? opcje general.modifyOtherObjects klikamy add right i wpisujemy tam general.modifyOtherObjects i klikamy add

Nasza funkcja powinna przybra? kolor zielony. Gdy tak si? sta?o restrtujemy nasz guieditor, poczym wpisujemy /guied i przechodzimy do tworzenia obrazka PPm -> crate->Image I klikamy refresh list, znajdujemy nasz obrazek i wybieramy go nastepnie naciskamy select/ok i za pomoc? LPM tworzymy ten obrazek.

Je?li u?ywamy Draw->dxImage to musimy u?y? eventu [wmta]onClientRender[/wmta] ale o to si? nie martwmy :) . Guieditor sam go utworzy.

Przyk?ady:

staticImage
[lua...
274. Kazdym sie wyswietla GUI
Mam problem z montowaniem MK, mianowicie gdy kto? wjedzie w marker to kazdemu wyswietla sie GUI z wyborem MK.
Kod strona clienta:
[lua]

GUIEditor = {
button = {},
window = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
function()
GUIEditor.window[1] = guiCreateWindow(339, 179, 499, 460, "", false)
guiWindowSetSizable(GUIEditor.window[1], false)
guiSetAlpha(GUIEditor.window[1], 0.83)

GUIEditor.button[1] = guiCreateButton(25, 37, 115, 58, "MK-1 Przy?pieszenie4n (3900$)", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[2] = guiCreateButton(140, 37, 113, 58, "MK-1 Pr?dko??4n (4600$)", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[3] = guiCreateButton(261, 38, 220, 57, "Demont", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[4] = guiCreateButton(25, 103, 115, 51, "MK-2 Przy?pieszenie4n (5100$)", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[5] = guiCreateButton(138, 103, 115, 51, "MK-2 Pr?dko??4n (5900$)", false, GUIEditor....
275. Kasa na minusie i wszystkim wyświetla się GUI
Skrypt wy?wietla ka?dym GUI montowania, gdy? kto? inny wjedzie w marker. Drugi problem polega na tym, ?e gdy kto? nie ma danej kwoty to mu bierze pieni?dze i zostawia mu na minusie.
Kod strona clienta (GUI):
[lua]

GUIEditor = {
button = {},
window = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
function()
GUIEditor.window[1] = guiCreateWindow(339, 179, 499, 460, "", false)
guiWindowSetSizable(GUIEditor.window[1], false)
guiSetAlpha(GUIEditor.window[1], 0.83)

GUIEditor.button[1] = guiCreateButton(25, 37, 115, 58, "MK-1 Przy?pieszenien (3900$)", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[2] = guiCreateButton(140, 37, 113, 58, "MK-1 Pr?dko??n (4600$)", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[3] = guiCreateButton(261, 38, 220, 57, "Demont", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[4] = guiCreateButton(25, 103, 115, 51, "MK-2 Przy?pieszenien (5100$)", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[5] = guiCreateButton(138, 1...
276. Częsci GUI
Witam mam pytanie, robie panel urz?du i jak mam zrobi? takie co?, ?e gdy urz?dnik wpisze login jakiego? gracza, aby pobiera?o ten tekst jako LOGIN a nie jakis tekst, bo chcia?bym potem temu loginowi nadawa? accountDate
kod..

c side:

[lua]
oknokata = guiCreateWindow(453, 278, 515, 319, "Kategoria A", false)
guiWindowSetSizable(oknokata, false)
loginlbl1 = guiCreateLabel(27, 45, 139, 39, "Login:", false, oknokata)
guiLabelSetHorizontalAlign(loginlbl1, "center", false)
guiLabelSetVerticalAlign(loginlbl1, "center")
editboxa = guiCreateEdit(168, 46, 199, 38, "", false, oknokata)
checka = guiCreateCheckBox(36, 138, 456, 48, "O?wiadczam, ?e u?ytkownik zda? egzamin teoretyczny i praktyczny.", true, false, oknokata)
gkata = guiCreateLabel(0, 144, 30, 32, "*", false, oknokata)
guiLabelSetColor(gkata, 255, 0, 0)
guiLabelSetHorizontalAlign(gkata, "right", false)
guiLabelSetVerticalAlign(gkata, "center")
daja = guiCreateButton(31, 243, 281, 53, "Daj prawo jazdy", false, oknokata)
wroca = guiCreateButton(339, 244, 153, 52, "Wr??", false, oknokata)


function editpob ( tekst )
tekst = guiGetText(editboxa)
end
addEvent("tekst", true)
addEventHandler("tekst", editpob)
[/lua]


s side

[lua]
function tekst(thePlayer)
triggerClientEvent("tekst", thePlayer)
setAccountData(tekst, "Prawo Jazdy", "KatA&...
277. [SKRYPT] Bronie w GUI V.0.1 by Ja
Witam.


Dzisiaj napisa?em system broni by VBS!
Mamy a? 29 broni ceny ustawicie sobie sami.



Opis.

Jakie s? komendy?

Wszystko jest pod jedn? komend? /bronie


Download(pwn i amx):

https://drive.google.com/folderview?id=0B5WGgtzFQCe1VWpBMmVEYzRuT2s&usp=sharing
278. gui guisetvisible "attempt to call global"
[lua]GUIEditor = {
button = {},
window = {},
memo = {}
}

addEventHandler("onClientResourceStart", resourceRoot,
function()
local screenW, screenH = guiGetScreenSize()
psfstart = guiCreateWindow((screenW - 840) / 2, (screenH - 595) / 2, 840, 595, "PSF", false)
guiWindowSetMovable(GUIEditor.window[1], false)
guiWindowSetSizable(GUIEditor.window[1], false)

psfstartbutt = guiCreateButton(10, 30, 190, 54, "test", false, psfstart)
guiSetFont(GUIEditor.button[1], "default-bold-small")
guiSetProperty(GUIEditor.button[1], "Font", "default-bold-small")

reg = guiCreateButton(10, 94, 190, 54, "test", false, psfstart)
guiSetFont(GUIEditor.button[2], "default-bold-small")
guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFD0006")

cmd = guiCreateButton(10, 158, 190, 54, "test", false, psfstart)
guiSetFont(GUIEditor.button[3], "default-bold-small")

anim = guiCreateButton(10, 222, 190, 54, "test", false, psfstart)
guiSetFont(GUIEditor.button[4], "default-bold-small")

ekipa = guiCreateButton(10, 286, 190, 54, "test", false, psfstart)
guiSetFont(GUIEditor.button[5], "default-bold-small")

vip = guiCreateButton(10, 350, 190, 54, "test&quo...
279. Gui i rozdzielczość gry.
Ustawi?em sobie panel z przyciskami po prawie stronie ekranu tu? pod zegarem. Niby wszystko ok ale jak zmieni? rozdzielczo?? gry to panel gdzie? znika. Przypuszczam ?e jest to wina gui bo gdy si? zmienia rozdzielczo?? to panel nie umie si? automatycznie dostosowa? i tak troch? na boku l?duje. Da si? to poprawi? czy po prostu musz? dla bezpiecze?stwa ustawia? panel zawsze na ?rodku ekranu?
280. Gui
Dzi?kuje za pomoc do zamkni?cia !