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

Wysłany: 2020-08-21, 22:00


Matikmontana

Modern Stories






Wiek: 22
Na forum: 2473 dni
Posty: 423
Nick w MP: Mazeusz*

Piwa: 1015

Respekt: 130
Respekt: 130

Ostrzeżeń: 60%
Witam, w trakcie robienia gui natrafi?em na problem z kt?rym nie mog? sobie poradzi?, a dok?adnie chodzi o od?wie?anie tekstu w gui oraz o getVehicleHandling po stronie clienta. Chcia?bym zrobi? ?e po klikni?ciu w button handling odrazu pojawia? si? w tabeli

np
jak tu jest 1200

po klikni?ciu w button by?o 1300.

Eventy od ustawienia handlingu mam.

Domy?lam si? ?e trzeba zrobi? eventy tylko nie wiem jakie i w jaki spos?b
marker createMarker(2482.35718, -1658.4516613.33557'cylinder'2.02551700150)

function hit(hit)
if getElementType(hit) ~= "player" then return end
local veh getPedOccupiedVehicle(hit)
if not veh then return end
if hit == localPlayer then
guiSetVisible(GUIEditor.window[1], true)
showCursor(true)
end
end
addEventHandler("onClientMarkerHit"markerhit)

GUIEditor = {
    button = {},
    window = {}
}
addEventHandler("onClientResourceStart"resourceRoot,
    function()
        GUIEditor.window[1] = guiCreateWindow(500179590700""false)
        guiWindowSetSizable(GUIEditor.window[1], false)
        guiSetAlpha(GUIEditor.window[1], 0.83)
        
        Gui3 guiCreateLabel(24080150100"Masa pojazdu: 1200kg"falseGUIEditor.window[1])
        Gui3 guiCreateLabel(255150150100"Ilo?? bieg?w: 5"falseGUIEditor.window[1])
        Gui3 guiCreateLabel(215220190100"Sztywno?? zawieszenia: 99.80%"falseGUIEditor.window[1])
        Gui3 guiCreateLabel(220290210100"Promie? skr?tu: 35.00 stopni"falseGUIEditor.window[1])
        Gui3 guiCreateLabel(205360210100"Pr?dko?? maksymalna: "falseGUIEditor.window[1])
        Gui3 guiCreateLabel(220430210100"Przyspieszenie: 3s-100km/h"falseGUIEditor.window[1])
        Gui3 guiCreateLabel(240500210100"Spr??arka: ON/OFF"falseGUIEditor.window[1])
        guiSetFont(Gui3"default-bold-small")
        
        GUIEditor.button[1] = guiCreateButton(256011560"Masa+"falseGUIEditor.window[1])
        guiSetProperty(GUIEditor.button[1], "NormalTextColour""FFAAAAAA")
        GUIEditor.button[2] = guiCreateButton(4506011560"Masa-"falseGUIEditor.window[1])
        guiSetProperty(GUIEditor.button[2], "NormalTextColour""FFAAAAAA")
        GUIEditor.button[3] = guiCreateButton(2513011560"Ilo?? bieg?w+"falseGUIEditor.window[1])
        guiSetProperty(GUIEditor.button[3], "NormalTextColour""FFAAAAAA")
        GUIEditor.button[4] = guiCreateButton(45013011560"Ilo?? bieg?w-"falseGUIEditor.window[1])
        guiSetProperty(GUIEditor.button[4], "NormalTextColour""FFAAAAAA")
        GUIEditor.button[5] = guiCreateButton(2520011560"Sztywno?? zawieszenia+"falseGUIEditor.window[1])
        guiSetProperty(GUIEditor.button[5], "NormalTextColour""FFAAAAAA")
        GUIEditor.button[6] = guiCreateButton(45020011560"Sztywno?? zawieszenia-"falseGUIEditor.window[1])
        guiSetProperty(GUIEditor.button[6], "NormalTextColour""FFAAAAAA")
        GUIEditor.button[7] = guiCreateButton(2527011560"Promie? skr?tu+"falseGUIEditor.window[1])
        guiSetProperty(GUIEditor.button[7], "NormalTextColour""FFAAAAAA")
        GUIEditor.button[8] = guiCreateButton(45027011560"Promie? skr?tu-"falseGUIEditor.window[1])
        guiSetProperty(GUIEditor.button[8], "NormalTextColour""FFAAAAAA")
        GUIEditor.button[9] = guiCreateButton(2534011560"Pr?dko?? maksymalna+"falseGUIEditor.window[1])
        guiSetProperty(GUIEditor.button[9], "NormalTextColour""FFAAAAAA")
        GUIEditor.button[10] = guiCreateButton(45034011560"Pr?dko?? maksymalna-"falseGUIEditor.window[1])
        guiSetProperty(GUIEditor.button[10], "NormalTextColour""FFAAAAAA")
        GUIEditor.button[11] = guiCreateButton(2541011560"Przyspieszenie+"falseGUIEditor.window[1])
        guiSetProperty(GUIEditor.button[11], "NormalTextColour""FFAAAAAA")
        GUIEditor.button[12] = guiCreateButton(45041011560"Przyspieszenie-"falseGUIEditor.window[1])
        guiSetProperty(GUIEditor.button[12], "NormalTextColour""FFAAAAAA")
        GUIEditor.button[13] = guiCreateButton(2548011560"Spr??arka+"falseGUIEditor.window[1])
        guiSetProperty(GUIEditor.button[13], "NormalTextColour""FFAAAAAA")
        GUIEditor.button[14] = guiCreateButton(45048011560"Spr??arka-"falseGUIEditor.window[1])
        guiSetProperty(GUIEditor.button[14], "NormalTextColour""FFAAAAAA")
        GUIEditor.button[69] = guiCreateButton(6260046081"Zamknij okno"falseGUIEditor.window[1])
        guiSetProperty(GUIEditor.button[69], "NormalTextColour""FFAAAAAA")    
    end
)


addEventHandler("onClientResourceStart",resourceRoot,
function()
guiSetVisible(GUIEditor.window[1],false)
end
)


[ Dodano: 2020-08-21, 22:02 ]
To 1200 to przyk?ad, dodatkowo chyba trzeba dorobi? funkcje od get handling

Podpis


Modern Stories
Discord
https://discord.gg/MRJSYq8
Forum
https://msmta.pl
Panel Gracza
https://panel.msmta.pl
Postaw piwo autorowi tego posta
 

 
Wysłany: 2020-08-22, 15:42


MeeShuffle

Programista/Grafik






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

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

Po zmianie handlingu, ustaw sobie guiSetText(element,text) - gdzie "text" bedzie oczywi?cie w twoim przypadku zmienn? pobranej warto?ci handlingu.

Postaw piwo autorowi tego posta
 

 
Tagi: refresh :: gui/handling :: cliencie
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Refresh gui/handling w cliencie Odpowiedz do tematu

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