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

Wysłany: 2015-08-02, 20:37


Vxen







Wiek: 27
Na forum: 4086 dni
Posty: 293

Piwa: 1299

Respekt: 130,5
Respekt: 130,5

AHA!! Ok mam to
sWsH guiGetScreenSize()
1360
y 768

--  /x) * sW, /y) * sH
local loop createMarker(358.24178.741008.38 1"cylinder"0.7255255255)
setElementDimension(loop1636)
setElementInterior(loop3)

sWsH guiGetScreenSize()
1360
y 768

jeden guiCreateButton(0.2150.2000.2000.200"P?ace za jeden"true)

GUIEditor={
button={},
window={},
label={}
}
--  /x) * sW, /y) * sH

function gui1()
local screenWscreenH guiGetScreenSize()

okno dxDrawRectangle(screenW 0.400screenH 0.600screenW 0.200screenH 0.300tocolor(000200), false)

text dxDrawText("PUNKT OP?AT"screenW 0.400screenH 0.900screenW 0.600screenH 0.342tocolor(01000222), 1.00"pricedown""center""center"falsefalsetruefalsefalse)

--jeden guiCreateButton(screenW 0.215screenH 0.200screenW 0.200screenH 0.200"P?ace za jeden"false)

--wszystkie guiCreateButton(screenW 0.215screenH 0.418screenW 0.366screenH 0.456"P?ace za wszystkie"false)

--guiWindowSetSizable(GUIEditor.window[1], false)
--guiSetAlpha(GUIEditor.window[1], 0.75)
--GUIEditor.label[1] = guiCreateLabel(145117983"Tu mo?esz op?aci? swoje mandaty "falseGUIEditor.window[1])
--guiLabelSetHorizontalAlign(GUIEditor.label[1], "left"true)
--GUIEditor.button[1] = guiCreateButton(2411216165"P?ace za jeden"falseGUIEditor.window[1])
--GUIEditor.button[2] = guiCreateButton(2418716165"P?ace za wszystkie"falseGUIEditor.window[1])
--guiSetVisible(GUIEditor.window[1], false)
end    
    
addEventHandler("onClientMarkerHit"loop, function(el,md)
  if not md or el~=localPlayer then return end
  addEventHandler ("onClientRender"rootgui1)
  guiSetVisible (jedentrue)
  showCursor(true,false)
  end)


local function win()
  removeEventHandler ("onClientRender"rootgui1)
  guiSetVisible (jedenfalse)
  showCursor(false)
end

addEventHandler("onClientMarkerLeave"loop, function(el,md)
  if el~=localPlayer then return end
  guiSetVisible (jedenfalse)
  win()
end)

addEventHandler("onClientGUIClick"jeden, function(plr)
    local mandaty getPlayerWantedLevel(plr)
    local mandat mandaty 700
    if mandaty == 0 then
    outputChatBox("* Nie posiadasz ?adnych mandat?w.",255,255,255plr)
        return
    end
    triggerServerEvent("setPlayerWantedLevel"localPlayermandat)
    win()
end)



addEventHandler("onClientGUIClick"wszystkie, function(plr)
    local mandaty getPlayerWantedLevel(plr)
    local mandat 700
    if mandaty == 0 then
    outputChatBox("* Nie posiadasz ?adnych mandat?w."plr)
        return
    end
    triggerServerEvent("setPlayerWantedLevel1"localPlayermandatymandat)
end)

No i jak si? wbija naserwer to wida? button zap?a? za jeden!

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-08-02, 20:44


#404







Wiek: 26
Na forum: 4771 dni
Posty: 1438

Piwa: 2512

Respekt: 833,5
Respekt: 833,5Respekt: 833,5

Ostrzeżeń: 60%

sWsH guiGetScreenSize()
1360
y 768

local loop createMarker(358.24178.741008.38 1"cylinder"0.7255255255)
setElementDimension(loop1636)
setElementInterior(loop3)

jeden guiCreateButton(0.2150.2000.2000.200"P?ace za jeden"true)
guiSetVisible(jedenfalse)

local screenWscreenH guiGetScreenSize()
function gui1()
dxDrawRectangle(screenW 0.400screenH 0.600screenW 0.200screenH 0.300tocolor(000200), false)
dxDrawText("PUNKT OP?AT"screenW 0.400screenH 0.900screenW 0.600screenH 0.342tocolor(01000222), 1.00"pricedown""center""center"falsefalsetruefalsefalse)
end    
    
addEventHandler("onClientMarkerHit"loop, function(el,md)
  if not md or el~=localPlayer then return end
  addEventHandler ("onClientRender"rootgui1)
  guiSetVisible (jedentrue)
  showCursor(true,false)
  end)


addEventHandler("onClientMarkerLeave"loop, function(el,md)
  if el~=localPlayer then return end
  guiSetVisible (jedenfalse)
  removeEventHandler ("onClientRender"rootgui1)
  showCursor(false)
end)

addEventHandler("onClientGUIClick"jeden, function(plr)
    local mandaty getPlayerWantedLevel(plr)
    local mandat mandaty 700
    if mandaty == 0 then
    outputChatBox("* Nie posiadasz ?adnych mandat?w.",255,255,255plr)
        return
    end
    triggerServerEvent("setPlayerWantedLevel"localPlayermandat)
    win()
end)



addEventHandler("onClientGUIClick"wszystkie, function(plr)
    local mandaty getPlayerWantedLevel(plr)
    local mandat 700
    if mandaty == 0 then
    outputChatBox("* Nie posiadasz ?adnych mandat?w."plr)
        return
    end
    triggerServerEvent("setPlayerWantedLevel1"localPlayermandatymandat)
end)



Po?ow? kodu Ci wywali?em z tego... Albo by?o to bezsensem, albo nieoptymalne...

A button pokazywa? si?, bo go nie ukry?e?...


PS: Chocia? jak tak na spokojnie patrz? w ten kod... Mo?na by jeszcze wi?cej wywali? z niego...

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-08-02, 21:39


Vxen







Wiek: 27
Na forum: 4086 dni
Posty: 293

Piwa: 1299

Respekt: 130,5
Respekt: 130,5

DestroY, Dalej to samo :( ...

[ Dodano: 2015-08-02, 22:34 ]
A jednak nie... wszystko dzia?a.

Postaw piwo autorowi tego posta
 

 
Tagi: opłacanie :: nie :: działa... :: 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 » opłacanie nie działa... 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