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

Wysłany: 2014-07-08, 21:54


Maximerr

Programmer PHP, LUA






Wiek: 25
Na forum: 4427 dni
Posty: 548

Piwa: 1051

Respekt: 365,3
Respekt: 365,3Respekt: 365,3Respekt: 365,3Respekt: 365,3

Witam! Napisa?em prac? dorywcz? kuriera, lecz niestety nie dzia?a, po wej?ciu na serwer odrazu pojawia si? gui roz?adunku, a po wej?ciu w markery nic si? nie dzieje. Za pomoc = :piwo:

Kod klient:
function info(tekst)
exports.msgboxrpg:showBox("info",tekst)
end

markerPracy createMarker 750.4638671875,-1335.3283691406,13.538581848145,"cylinder",1.2,255,255,255 )
blipPracy createBlip 750.4638671875,-1335.3283691406,13.53858184814551 )

--Funkcja wyswietlenia GUI zaladunku
function wyswietlGUI()
addEventHandler "onClientMarkerHit"markerPracy, function(hitPlayer)
if source ~= marker and element ~= getLocalPlayer() then return end
guiSetVisible kurierOknotrue )
showCursor true )
end)
end

--Przyjecie i odmowienie pracy
addEventHandler "onClientGUIClick"anuluj, function()
guiSetVisible(kurierOkno,false)
showCursor(false)
end)

addEventHandler "onClientGUIClick"podejmij, function()
guiSetVisible(kurierOkno,false)
showCursor(false)
celBlip createBlip 2801.4165039063, -1087.776977539130.72171592712441 )
celMarker createMarker 2801.4165039063, -1087.776977539130.721715927124"cylinder"1.52552550170 )
info("Punkt celu oznaczony zosta? na mapie, dowie? tam paczki kt?re zosta?y ci za?adowane.")
end)

--Gui Zaladunku
kurierOkno guiCreateTab("Praca Dorywcza - Kurier Poczty santos")
kurierTlo guiCreateTabPanel(451234382316,false,kurierOkno)
guiWindowSetMovable(kurierOknofalse)
guiWindowSetSizable(kurierOknofalse)
podejmij guiCreateButton(45948813939"Podejmij Prac?",false,kurierOkno)
guiSetProperty(podejmij"NormalTextColour""FF11FF00")
anuluj guiCreateButton(68448813939"Zamknij",false,kurierOkno)
guiSetProperty(anuluj"NormalTextColour""FFFF0000")
opis guiCreateLabel(459271373184"Kurier Poczty Santos - Wcielasz si? w rol? kuriera Poczty Santos.\nZa?odwujesz paczk?, poczym wieziesz do klienta. Za wykonane\n zadanie, bez uszkodzenia paczki otrzymujesz 1 Best Points.",false,kurierOkno)
guiSetFont(opis"default-bold-small")
guiLabelSetColor(opis0227255)
guiLabelSetHorizontalAlign(opis"center"false)
guiSetVisible(kurierOknofalse)

--Gui Rozladunku
rozladunekOkno guiCreateTabPanel(387256425252false)
rozladnuekTab guiCreateTab("Kurier Poczty Santos - Roz?adunek"rozladunekOkno)
opis guiCreateLabel(101540777"Miejsce roz?adunku paczek, pracy dorywczej Kurier Poczty Santos."falserozladunekTab)
guiSetFont(GUIEditor.label[1], "default-bold-small")
guiLabelSetHorizontalAlign(GUIEditor.label[1], "center"false)
zamknij guiCreateButton(8017826539"Zamknij"falserozladunekTab)
rozladuj guiCreateButton(8012926539"Roz?aduj paczki"falserozladunekTab)
guiSetVisible(rozladunektabfalse)

--Wyswietl rozladunek
function wyswietlGUI()
addEventHandler "onClientMarkerHit"markerCel, function()
if source ~= marker and element ~= getLocalPlayer() then return end
guiSetVisible rozladunekOknotrue )
showCursor true )
end)
end


--Przyjecie i odmowienie rozladowanie
addEventHandler "onClientGUIClick"zamknij, function()
guiSetVisible(rozladunekOkno,false)
showCursor(false)
end)

addEventHandler "onClientGUIClick"rozladuj, function()
guiSetVisible(rozladunekOkno,false)
showCursor(false)
info("Za dostarczenie paczek otrzymujesz 1000$ i 1 Best Points.\nOby tak dalej!")
destroyElement celBlip )
destroyElement celMarker )
end)


Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
B4tek
Wysłany: 2014-07-08, 22:29


MeeShuffle

Programista/Grafik






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

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

Co do du?ej i ma?ej litery musz? by? podane zmienne :


rozladunekOkno guiCreateTabPanel(387256425252false)
rozladnuekTab guiCreateTab("Kurier Poczty Santos - Roz?adunek"rozladunekOkno)
guiSetVisible(rozladunektabfalse)


Przyjrzyj si?.

[ Dodano: 2014-07-08, 22:29 ]
I skoro parentem danego gui jest inne, to podaj parenta jako zmienn?.

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-07-08, 23:08


Maximerr

Programmer PHP, LUA






Wiek: 25
Na forum: 4427 dni
Posty: 548

Piwa: 1051

Respekt: 365,3
Respekt: 365,3Respekt: 365,3Respekt: 365,3Respekt: 365,3

Wszystko zrobi?em i i tak nie dzia?a ;/

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-07-08, 23:12


MeeShuffle

Programista/Grafik






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

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

Co nie dzia?a ? Pokazuje si??

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-07-09, 10:19


Maximerr

Programmer PHP, LUA






Wiek: 25
Na forum: 4427 dni
Posty: 548

Piwa: 1051

Respekt: 365,3
Respekt: 365,3Respekt: 365,3Respekt: 365,3Respekt: 365,3

No si? nie pokazuje.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-07-09, 11:46


MeeShuffle

Programista/Grafik






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

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

addEventHandler "onClientMarkerHit"markerPracy, function(hitPlayer)
if source ~= marker and element ~= getLocalPlayer() then return end


W elemencie da?e? markerPracy a w warunku marker....

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-07-09, 12:26


Maximerr

Programmer PHP, LUA






Wiek: 25
Na forum: 4427 dni
Posty: 548

Piwa: 1051

Respekt: 365,3
Respekt: 365,3Respekt: 365,3Respekt: 365,3Respekt: 365,3

Poprawione, nadal nic.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-07-09, 12:51


MeeShuffle

Programista/Grafik






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

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

guiCreateTab i dalsze funkcje na tworzenie okna daj na samej g?rze..

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-07-09, 13:01


Maximerr

Programmer PHP, LUA






Wiek: 25
Na forum: 4427 dni
Posty: 548

Piwa: 1051

Respekt: 365,3
Respekt: 365,3Respekt: 365,3Respekt: 365,3Respekt: 365,3

Nadal nic

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-07-09, 14:04


MeeShuffle

Programista/Grafik






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

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

if source ~= marker and element ~= getLocalPlayer() then return end


Gdzie masz zdefiniowane "element" ?

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-07-09, 22:04


Maximerr

Programmer PHP, LUA






Wiek: 25
Na forum: 4427 dni
Posty: 548

Piwa: 1051

Respekt: 365,3
Respekt: 365,3Respekt: 365,3Respekt: 365,3Respekt: 365,3

a, nie mam ;/
Na co to zdefiniowa?? thePlayer, czy markerPracy?

Postaw piwo autorowi tego posta
 

 
Tagi: praca :: dorywcza :: kurier
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Praca dorywcza - kurier 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