Wysłany: 2014-07-19, 21:33
Maximerr
Programmer PHP, LUA
Wiek: 25 Na forum: 4427 dni Posty: 548
Piwa : 1051
Witam! Zrobi?em sobi? prac? dorywcz?, lecz jedna rzecz nie dzia?a. Kiedy maj?c prac?, wje?d?am w marker roz?adunku - nic si? nie dzieje; totalnie. Za pomoc, naturalnie
KOD KLIENT: function info ( tekst )
exports . msgboxrpg : showBox ( "info" , tekst )
end
markerPracy = createMarker ( 750.4638671875 ,- 1335.3283691406 , 13 , "cylinder" , 1.5 , 255 , 255 , 255 )
-- Funkcja wyswietlenia GUI zaladunku
addEventHandler ( "onClientMarkerHit" , markerPracy , function( element )
if element ~= getLocalPlayer () then return end
guiSetVisible ( kurierOkno , true )
guiSetVisible ( podejmij , true )
guiSetVisible ( opis , true )
guiSetVisible ( anuluj , true )
showCursor ( true )
end )
-- Gui Zaladunku
kurierOkno = guiCreateWindow ( 451 , 234 , 382 , 316 , "" , false )
guiWindowSetMovable ( kurierOkno , false )
guiWindowSetSizable ( kurierOkno , false )
podejmij = guiCreateButton ( 459 , 488 , 139 , 39 , "Podejmij Prac?" , false )
anuluj = guiCreateButton ( 684 , 488 , 139 , 39 , "Zamknij" , false )
opis = guiCreateLabel ( 459 , 271 , 373 , 184 , "Kurier Poczty Santos - Wcielasz si? w rol? kuriera Poczty Santos.\nZa?adowywujesz paczk?, poczym wieziesz do klienta. Za wykonane\n zadanie, bez uszkodzenia paczki otrzymujesz 1 Best Points i 500$." , false )
guiSetFont ( opis , "default-bold-small" )
guiLabelSetColor ( opis , 0 , 227 , 255 )
guiLabelSetHorizontalAlign ( opis , "center" , false )
guiSetVisible ( kurierOkno , false )
guiSetVisible ( podejmij , false )
guiSetVisible ( opis , false )
guiSetVisible ( anuluj , false )
-- Przyjecie i odmowienie pracy
addEventHandler ( "onClientGUIClick" , anuluj , function()
guiSetVisible ( kurierOkno , false )
guiSetVisible ( podejmij , false )
guiSetVisible ( opis , false )
guiSetVisible ( anuluj , false )
showCursor ( false )
end )
addEventHandler ( "onClientGUIClick" , podejmij , function()
guiSetVisible ( kurierOkno , false )
guiSetVisible ( podejmij , false )
guiSetVisible ( opis , false )
guiSetVisible ( anuluj , false )
showCursor ( false )
celBlip = createBlip ( 2801.4165039063 , - 1087.7769775391 , 30.721715927124 , 41 )
celMarker = createMarker ( 2801.4165039063 , - 1087.7769775391 , 30.721715927124 , "cylinder" , 1.5 , 255 , 255 , 0 , 170 )
info ( "Punkt celu oznaczony zosta? na mapie, dowie? tam paczk?." )
end )
-- Roz ? adunek
addEventHandler ( "onClientMarkerHit" , celMarker , function( element )
if element ~= getLocalPlayer () then return end
givePlayerMoney ( thePlayer , 500 )
info ( "Otrzymujesz 500 z? i 1 Best Points za wykonan? robot?." )
destroyElement ( celBlip )
destroyElement ( celMarker )
triggerServerEvent ( "dajbp" , getLocalPlayer () )
end )
trigger mam zrobiony, je?li trzeba ods?oni? strone servera..
Wysłany: 2014-07-19, 22:49
monio
Wiek: 30 Na forum: 4887 dni Posty: 319
Nick w MP: Monio99
Piwa : 3565
Stary ale daj givePlayerMoney na strone serwra bo jak gracz wyjdzie to mu usunie te zarobione dolary, ?e tak powiem
Wysłany: 2014-07-19, 23:33
RezoT
Wiek: 30 Na forum: 4416 dni Posty: 126
Nick w MP: RezoT
Piwa : 306
Kod: function info(tekst)
exports.msgboxrpg:showBox("info",tekst)
end
markerPracy = createMarker ( 750.4638671875,-1335.3283691406,13,"cylinder",1.5,255,255,255 )
celMarker = createMarker ( 2801.4165039063, -1087.7769775391, 30.721715927124, "cylinder", 1.5, 255, 0, 0, 0, 0 )
--Funkcja wyswietlenia GUI zaladunku
addEventHandler ( "onClientMarkerHit", markerPracy, function(element)
if element ~= getLocalPlayer() then return end
guiSetVisible(kurierOkno, true)
guiSetVisible(podejmij, true)
guiSetVisible(opis, true)
guiSetVisible(anuluj, true)
showCursor ( true )
end)
--Gui Zaladunku
kurierOkno = guiCreateWindow(451, 234, 382, 316, "", false)
guiWindowSetMovable(kurierOkno, false)
guiWindowSetSizable(kurierOkno, false)
podejmij = guiCreateButton(459, 488, 139, 39, "Podejmij Prac?",false)
anuluj = guiCreateButton(684, 488, 139, 39, "Zamknij",false)
opis = guiCreateLabel(459, 271, 373, 184, "Kurier Poczty Santos - Wcielasz si? w rol? kuriera Poczty Santos.\nZa?adowywujesz paczk?, poczym wieziesz do klienta. Za wykonane\n zadanie, bez uszkodzenia paczki otrzymujesz 1 Best Points i 500$.",false)
guiSetFont(opis, "default-bold-small")
guiLabelSetColor(opis, 0, 227, 255)
guiLabelSetHorizontalAlign(opis, "center", false)
guiSetVisible(kurierOkno, false)
guiSetVisible(podejmij, false)
guiSetVisible(opis, false)
guiSetVisible(anuluj, false)
--Przyjecie i odmowienie pracy
addEventHandler ( "onClientGUIClick", anuluj, function()
guiSetVisible(kurierOkno, false)
guiSetVisible(podejmij, false)
guiSetVisible(opis, false)
guiSetVisible(anuluj, false)
showCursor(false)
end)
addEventHandler ( "onClientGUIClick", podejmij, function()
guiSetVisible(kurierOkno, false)
guiSetVisible(podejmij, false)
guiSetVisible(opis, false)
guiSetVisible(anuluj, false)
showCursor(false)
celBlip = createBlip ( 2801.4165039063, -1087.7769775391, 30.721715927124, 41 )
celMarker1 = createMarker ( 2801.4165039063, -1087.7769775391, 30.721715927124, "cylinder", 1.5, 255, 255, 0, 170 )
info("Punkt celu oznaczony zosta? na mapie, dowie? tam paczk?.")
end)
--Roz?adunek
addEventHandler ( "onClientMarkerHit", celMarker, function(element)
if element ~= getLocalPlayer() then return end
givePlayerMoney ( thePlayer, 500 )
info("Otrzymujesz 500 z? i 1 Best Points za wykonan? robot?.")
destroyElement ( celBlip )
destroyElement ( celMarker1 )
triggerServerEvent ( "dajbp", getLocalPlayer() )
end)
powinno ci dzialac
Tagi: praca :: dorywcza
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: