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

Wysłany: 2022-02-18, 14:34


Hartkor112







Wiek: 29
Na forum: 4891 dni
Posty: 10
Nick w MP: ~RPS~Kirito^

Piwa: 9

Respekt: 60

Witam !

Po otwarciu panelu nie pojawiaj? si? nazwy aut , score od ilu mo?na kupi? i kasa tylko gracze. Oto kod.


Kod:

Client:

Kod:

okno = guiCreateWindow(385,236,602,519,"Panel Salonu v0.1",false)
graczelist = guiCreateGridList(277,24,140,486,false,okno)
guiGridListSetSelectionMode(graczelist,2)

gracze = guiGridListAddColumn(graczelist,"Gracze",0.8)
sell = guiCreateButton(421,24,172,71,"Sprzedaj Auto",false,okno)
close = guiCreateButton(421,103,171,71,"Zamknij Panel",false,okno)
acs = guiCreateGridList(9,24,260,486,false,okno)
guiGridListSetSelectionMode(a,c,s,2)

guiGridListAddColumn(acs,"Auta",0.4)

guiGridListAddColumn(acs,"Cena",0.3)

guiGridListAddColumn(acs,"Score",0.2)
guiSetVisible(okno,false)

local salon = getTeamFromName("Salon Samochodowy")

function open_salon_panel()
if getPlayerTeam(getLocalPlayer()) == salon then
for k,v in ipairs(getElementsByType("player")) do

guiGridListSetItemText (graczelist, guiGridListAddRow (graczelist), gracze,getPlayerName(v), false, false )
guiSetVisible(okno,true)
showCursor(true)

end
end
end
addEvent("open_salon_panel",true)
addEventHandler ( "open_salon_panel", getRootElement(), open_salon_panel )

function close_salon_panel()
guiSetVisible(okno,false)
showCursor(false)
guiGridListClear (graczelist)
end

addEventHandler("onClientGUIClick",close,close_salon_panel)



Kod:

Server:

Kod:

function panel_salon_open(thePlayer)
local salon = getTeamFromName("Salon Samochodowy")
if getPlayerTeam(thePlayer) == salon then
triggerClientEvent (thePlayer, "open_salon_panel", getRootElement())
end
end
addCommandHandler("sp", panel_salon_open)


Kod:

Auta.xml

Kod:


<root>
<auto koszt="5000" minscore="50">445</auto>
<auto koszt="16000" minscore="100">541</auto>
<auto koszt="17000" minscore="100">480</auto>
<auto koszt="20000" minscore="100">562</auto>
<auto koszt="18000" minscore="100">565</auto>
<auto koszt="19000" minscore="100">434</auto>
<auto koszt="21000" minscore="100">494</auto>
<auto koszt="25000" minscore="100">411</auto>
<auto koszt="14000" minscore="100">559</auto>
<auto koszt="22000" minscore="100">560</auto>
<auto koszt="23000" minscore="100">506</auto>
<auto koszt="24000" minscore="100">451</auto>
<auto koszt="23000" minscore="100">558</auto>
<auto koszt="12000" minscore="100">477</auto>
<auto koszt="7000" minscore="50">500</auto>
<auto koszt="20000" minscore="100">539</auto>
<auto koszt="7000" minscore="75">471</auto>
<auto koszt="4000" minscore="75">571</auto>
<auto koszt="18000" minscore="100">603</auto>
<auto koszt="17000" minscore="100">475</auto>
<auto koszt="14000" minscore="100">402</auto>
<auto koszt="6000" minscore="50">534</auto>
<auto koszt="9000" minscore="50">412</auto>
<auto koszt="9000" minscore="50">567</auto>
<auto koszt="8000" minscore="50">576</auto>
<auto koszt="500" minscore="0">554</auto>
<auto koszt="10000" minscore="50">431</auto>
<auto koszt="30000" minscore="75">454</auto>
<auto koszt="22000" minscore="75">493</auto>
<auto koszt="22000" minscore="75">452</auto>
<auto koszt="17000" minscore="75">522</auto>
<auto koszt="12000" minscore="75">468</auto>
<auto koszt="13000" minscore="75">463</auto>
<auto koszt="500" minscore="10">510</auto>
<auto koszt="600" minscore="10">509</auto>
<auto koszt="400" minscore="10">481</auto>
<auto koszt="13000" minscore="75">521</auto>
<auto koszt="33000" minscore="100">487</auto>
<auto koszt="22000" minscore="100">469</auto>
<auto koszt="7000" minscore="50">507</auto>
<auto koszt="6000" minscore="50">551</auto>
<auto koszt="8000" minscore="50">492</auto>
<auto koszt="8000" minscore="50">587</auto>
<auto koszt="7000" minscore="50">547</auto>
<auto koszt="6000" minscore="50">602</auto>
<auto koszt="4500" minscore="50">496</auto>
<auto koszt="6000" minscore="50">526</auto>
<auto koszt="5000" minscore="50">410</auto>
<auto koszt="3000" minscore="50">462</auto>
<auto koszt="26000" minscore="100">444</auto>
<auto koszt="8000" minscore="50">542</auto>
<auto koszt="500" minscore="0">455</auto>
<auto koszt="17000" minscore="100">415</auto>
<auto koszt="35000" minscore="100">519</auto>
<auto koszt="5000" minscore="75">568</auto>
<auto koszt="11000" minscore="100">429</auto>
<auto koszt="20000" minscore="50">495</auto>
<auto koszt="8000" minscore="25">420</auto>
<auto koszt="16000" minscore="25">437</auto>
<auto koszt="9000" minscore="25">525</auto>
<auto koszt="8000" minscore="25">416</auto>
<auto koszt="12000" minscore="25">523</auto>
<auto koszt="9000" minscore="25">597</auto>
<auto koszt="7000" minscore="25">486</auto>
<auto koszt="9000" minscore="25">515</auto>
<auto koszt="14000" minscore="25">582</auto>
<auto koszt="16000" minscore="25">488</auto>
<auto koszt="500" minscore="0">482</auto>
<auto koszt="500" minscore="0">422</auto>
<auto koszt="500" minscore="0">413</auto>
<auto koszt="500" minscore="0">440</auto>
<auto koszt="6000" minscore="50">489</auto>
<auto koszt="9000" minscore="50">535</auto>
<auto koszt="22000" minscore="100">561</auto>
<auto koszt="8000" minscore="50">589</auto>
<auto koszt="6000" minscore="50">549</auto>
<auto koszt="13000" minscore="50">545</auto>
<auto koszt="2000" minscore="50">533</auto>
<auto koszt="9000" minscore="75">461</auto>
<auto koszt="25000" minscore="100">409</auto>
<auto koszt="13000" minscore="45">438</auto>
<auto koszt="11000" minscore="75">555</auto>
</root>





Postaw piwo autorowi tego posta
 

 
Wysłany: 2022-02-18, 16:52


Matikmontana

Modern Stories






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

Piwa: 1015

Respekt: 130
Respekt: 130

Ostrzeżeń: 60%
B??dy w db3?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2022-02-18, 19:22


adaskOO

Ten który patrzy






Wiek: 24
Na forum: 3732 dni
Posty: 249
Nick w MP: adaskOO

Piwa: 3168

Respekt: 280
Respekt: 280Respekt: 280Respekt: 280

Tutaj w og?le nie ma niczego odpowidzialnego za wy?wietlaniu elementow w gridliscie
musisz u?y?

Więcej informacji znajdziesz w Wikipedii MTA:

xmlLoadFile

nast?pnie

Więcej informacji znajdziesz w Wikipedii MTA:

xmlNodeGetAttribute

a potem

Więcej informacji znajdziesz w Wikipedii MTA:

guiGridListSetItemText

oraz w tym poprzednim

Więcej informacji znajdziesz w Wikipedii MTA:

guiGridListAddRow


Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
Hartkor112
Wysłany: 2022-04-09, 09:42


Hartkor112







Wiek: 29
Na forum: 4891 dni
Posty: 10
Nick w MP: ~RPS~Kirito^

Piwa: 9

Respekt: 60

Temat do zamkni?cia wszystko ju? dzia?a pozdrawiam :)

Postaw piwo autorowi tego posta
 

 
Tagi: panel :: salonu
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