Wysłany: 2019-02-22, 14:12
Gravgor
Wiek: 22 Na forum: 3619 dni Posty: 380
Nick w MP: 1944
Piwa : 702
local elo = createColCuboid ( 1612.37 , - 1801.68 , 12.47 , 10.75 , 10.5 , 6.75 )
local bm = "910340"
local s1 = "Srednia"
local l1 = "Duza"
local fc = "825400"
local bb = "186000"
local zlecenia2 ={
-- nazwa , zarobek , cel , zarobek RP --
{ "Silniki" , bb , "BB" , s1 },
{ "Imigranci" , fc , "FC" , "Mala" },
}
local screenW , screenH = guiGetScreenSize ()
gluwno = guiCreateWindow (( screenW - 390 ) / 2 , ( screenH - 285 ) / 2 , 390 , 285 , "System zlece?" , false )
local gridlist = guiCreateGridList ( 10 , 68 , 370 , 176 , false , gluwno )
local zlecenie = guiGridListAddColumn ( gridlist , "Zlecenie" , 0.4 )
local zarobek = guiGridListAddColumn ( zlecenia , "Zarobek" , 0.2 )
local cel = guiGridListAddColumn ( gridlist , "Cel" , 0.2 )
local wartosc = guiGridListAddColumn ( gridlist , "Warto??" , 0.1 )
guiSetVisible ( gluwno , false )
guiSetVisible ( gridlist , false )
addEvent ( "kur:open" , true )
addEventHandler ( "kur:open" , getRootElement (), function( hitElement )
if hitElement == localPlayer then
guiSetVisible ( gluwno , true )
guiSetVisible ( gridlist , true )
guiWindowSetMovable ( gluwno , false )
guiWindowSetSizable ( gluwno , false )
guiSetAlpha ( gluwno , 0.75 )
informejszyn = guiCreateLabel ( 16 , 29 , 364 , 43 , "Poni?ej wy?wietlono mo?liwe zlecenia, wybierz jedno z nich a nast?pnie kliknij OK." , false , gluwno )
guiSetFont ( informejszyn , "default-bold-small" )
guiLabelSetHorizontalAlign ( informejszyn , "left" , true )
button = guiCreateButton ( 236 , 249 , 144 , 26 , "ZAMKNIJ" , false , gluwno )
ok = guiCreateButton ( 10 , 249 , 144 , 26 , "OK" , false , gluwno )
for i , v in pairs ( zlecenia2 ) do
local row = guiGridListAddRow ( gridlist )
guiGridListSetItemText ( gridlist , row , 1 , v [ 1 ], false , false )
guiGridListSetItemText ( gridlist , row , 2 , v [ 2 ].. " $" , false , false )
guiGridListSetItemText ( gridlist , row , 3 , v [ 3 ], false , false )
guiGridListSetItemText ( gridlist , row , 4 , v [ 4 ], false , false )
info1 = v [ 1 ]
info2 = v [ 2 ]
info3 = v [ 3 ]
info4 = v [ 4 ]
showCursor ( true )
end
end
end )
addEvent ( "bbm:create" , true )
addEventHandler ( "bbm:create" , getRootElement (), function( gracz )
if gracz ~= localPlayer then return end
bbm = createBlip ( 212.88 , 24.88 , 2.57 , 41 )
end )
addEvent ( "bfc:create" , true )
addEventHandler ( "bfc:create" , getRootElement (), function( gracz )
if gracz ~= localPlayer then return end
bfc = createBlip (- 361.08 , 1191.43 , 19.74 , 41 )
end )
addEvent ( "bbb:create" , true )
addEventHandler ( "bbb:create" , getRootElement (), function( gracz )
if gracz ~= localPlayer then return end
bbb = createBlip ( 212.88 , 24.88 , 2.57 , 41 )
end )
addEvent ( "bbm:destroy" , true )
addEventHandler ( "bbm:destroy" , getRootElement (), function( gracz )
if gracz ~= localPlayer then return end
destroyElement ( bbm )
end )
addEvent ( "bfc:destroy" , true )
addEventHandler ( "bfc:destroy" , getRootElement (), function( gracz )
if gracz ~= localPlayer then return end
destroyElement ( bfc )
end )
addEvent ( "bbb:destroy" , true )
addEventHandler ( "bbb:destroy" , getRootElement (), function( gracz )
if gracz ~= localPlayer then return end
destroyElement ( bbb )
end )
function click ()
if source == button then
showCursor ( false )
guiSetVisible ( gluwno , false )
end
if source == ok then
wrow , wcol = guiGridListGetSelectedItem ( zlecenia )
akcja = guiGridListGetItemText ( zlecenia , wrow , kolumna )
if akcja == "" then outputChatBox ( "Musisz wybra? zlecenie" , 255 , 255 , 255 ) return end
for i , v in pairs ( zlecenia2 ) do
if akcja == v [ 1 ] then
local vehicles = getElementsWithinColShape ( elo , "vehicle" )
if #vehicles > 0 then
outputChatBox ( "Poczekaj a? gracz odjedzie z miejsca spawnu pojazdu!" , 255 , 255 , 255 )
guiSetVisible ( gluwno , false )
showCursor ( false )
return
end
guiSetVisible ( gluwno , false )
showCursor ( false )
outputChatBox ( "Informacje nt. zlecenia:" , 255 , 255 , 255 )
outputChatBox ( "Zlecenie: " .. v [ 1 ].. "" , 255 , 255 , 255 )
outputChatBox ( "Zarobek: " .. v [ 2 ].. " $" , 255 , 255 , 255 )
-- outputChatBox ( "Za wykonanie zlecenia otrzymasz: " .. v [ 4 ].. " RP" , 255 , 255 , 255 )
triggerServerEvent ( "k:zacznij" , localPlayer , localPlayer , v [ 1 ], v [ 2 ], v [ 3 ], v [ 4 ])
end
end
end
end
addEventHandler ( "onClientGUIClick" , resourceRoot , click )
fileDelete ( "c.lua" )
Podpis
Portfolio marceliborowczak.me
Wysłany: 2019-02-22, 15:50
Pyrek24
Wiek: 25 Na forum: 3438 dni Posty: 546
Nick w MP: Pyrek
Piwa : 10
Wysłany: 2019-02-23, 11:48
Gravgor
Wiek: 22 Na forum: 3619 dni Posty: 380
Nick w MP: 1944
Piwa : 702
local elo = createColCuboid ( 1612.37 , - 1801.68 , 12.47 , 10.75 , 10.5 , 6.75 )
local bm = "910340"
local s1 = "Srednia"
local l1 = "Duza"
local fc = "825400"
local bb = "186000"
local zlecenia2 ={
-- nazwa , zarobek , cel , zarobek RP --
{ "Silniki" , bb , "BB" , s1 },
{ "Imigranci" , fc , "FC" , "Mala" },
}
local screenW , screenH = guiGetScreenSize ()
gluwno = guiCreateWindow (( screenW - 390 ) / 2 , ( screenH - 285 ) / 2 , 390 , 285 , "System zlece?" , false )
local gridlist = guiCreateGridList ( 10 , 68 , 370 , 176 , false , gluwno )
local zlecenie = guiGridListAddColumn ( gridlist , "Zlecenie" , 0.4 )
local zarobek = guiGridListAddColumn ( zlecenia , "Zarobek" , 0.2 )
local cel = guiGridListAddColumn ( gridlist , "Cel" , 0.2 )
local wartosc = guiGridListAddColumn ( gridlist , "Warto??" , 0.1 )
guiSetVisible ( gluwno , false )
guiSetVisible ( gridlist , false )
addEvent ( "kur:open" , true )
addEventHandler ( "kur:open" , getRootElement (), function( hitElement )
if hitElement == localPlayer then
guiSetVisible ( gluwno , true )
guiSetVisible ( gridlist , true )
guiWindowSetMovable ( gluwno , false )
guiWindowSetSizable ( gluwno , false )
guiSetAlpha ( gluwno , 0.75 )
informejszyn = guiCreateLabel ( 16 , 29 , 364 , 43 , "Poni?ej wy?wietlono mo?liwe zlecenia, wybierz jedno z nich a nast?pnie kliknij OK." , false , gluwno )
guiSetFont ( informejszyn , "default-bold-small" )
guiLabelSetHorizontalAlign ( informejszyn , "left" , true )
button = guiCreateButton ( 236 , 249 , 144 , 26 , "ZAMKNIJ" , false , gluwno )
ok = guiCreateButton ( 10 , 249 , 144 , 26 , "OK" , false , gluwno )
for i , v in pairs ( zlecenia2 ) do
local row = guiGridListAddRow ( gridlist )
guiGridListSetItemText ( gridlist , row , 1 , v [ 1 ], false , false )
guiGridListSetItemText ( gridlist , row , 2 , v [ 2 ].. " $" , false , false )
guiGridListSetItemText ( gridlist , row , 3 , v [ 3 ], false , false )
guiGridListSetItemText ( gridlist , row , 4 , v [ 4 ], false , false )
info1 = v [ 1 ]
info2 = v [ 2 ]
info3 = v [ 3 ]
info4 = v [ 4 ]
showCursor ( true )
end
end
end )
addEvent ( "bbm:create" , true )
addEventHandler ( "bbm:create" , getRootElement (), function( gracz )
if gracz ~= localPlayer then return end
bbm = createBlip ( 212.88 , 24.88 , 2.57 , 41 )
end )
addEvent ( "bfc:create" , true )
addEventHandler ( "bfc:create" , getRootElement (), function( gracz )
if gracz ~= localPlayer then return end
bfc = createBlip (- 361.08 , 1191.43 , 19.74 , 41 )
end )
addEvent ( "bbb:create" , true )
addEventHandler ( "bbb:create" , getRootElement (), function( gracz )
if gracz ~= localPlayer then return end
bbb = createBlip ( 212.88 , 24.88 , 2.57 , 41 )
end )
addEvent ( "bbm:destroy" , true )
addEventHandler ( "bbm:destroy" , getRootElement (), function( gracz )
if gracz ~= localPlayer then return end
destroyElement ( bbm )
end )
addEvent ( "bfc:destroy" , true )
addEventHandler ( "bfc:destroy" , getRootElement (), function( gracz )
if gracz ~= localPlayer then return end
destroyElement ( bfc )
end )
addEvent ( "bbb:destroy" , true )
addEventHandler ( "bbb:destroy" , getRootElement (), function( gracz )
if gracz ~= localPlayer then return end
destroyElement ( bbb )
end )
function click ()
if source == button then
showCursor ( false )
guiSetVisible ( gluwno , false )
end
if source == ok then
wrow = guiGridListGetSelectedItem ( gridlist )
akcja = guiGridListGetItemText ( gridlist , wrow , zlecenie )
if akcja == "" then outputChatBox ( "Musisz wybra? zlecenie" , 255 , 255 , 255 ) return end
for i , v in pairs ( zlecenia2 ) do
if akcja == v [ 1 ] then
local vehicles = getElementsWithinColShape ( elo , "vehicle" )
if #vehicles > 0 then
outputChatBox ( "Poczekaj a? gracz odjedzie z miejsca spawnu pojazdu!" , 255 , 255 , 255 )
guiSetVisible ( gluwno , false )
showCursor ( false )
return
end
guiSetVisible ( gluwno , false )
showCursor ( false )
outputChatBox ( "Informacje nt. zlecenia:" , 255 , 255 , 255 )
outputChatBox ( "Zlecenie: " .. v [ 1 ].. "" , 255 , 255 , 255 )
outputChatBox ( "Zarobek: " .. v [ 2 ].. " $" , 255 , 255 , 255 )
-- outputChatBox ( "Za wykonanie zlecenia otrzymasz: " .. v [ 4 ].. " RP" , 255 , 255 , 255 )
triggerServerEvent ( "k:zacznij" , localPlayer , localPlayer , v [ 1 ], v [ 2 ], v [ 3 ], v [ 4 ])
end
end
end
end
addEventHandler ( "onClientGUIClick" , resourceRoot , click )
fileDelete ( "c.lua" )
Podpis
Portfolio marceliborowczak.me
Wysłany: 2019-02-23, 18:07
Pyrek24
Wiek: 25 Na forum: 3438 dni Posty: 546
Nick w MP: Pyrek
Piwa : 10
Wszystko git, lecz gdy mamy t? tabele to zamiast wy?wietla? pojedynczo to si? wy?wietla ka?de zlecenie podw?jnie.
--nazwa, zarobek, cel, zarobek RP--
{"Silniki", bb, "BB", s1},
{"Imigranci", fc, "FC", "Mala"},
}
ss
https://imgur.com/S9Eu6Sw
Tagi: praca :: dostawcy.
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: