Wysłany: 2014-06-27, 21:21
Maciąg
Wiek: 26 Na forum: 4376 dni Posty: 211
Nick w MP: Dawirzo
Piwa : 149
Cze??. Mam problem i prosz? Was o pomoc. Chodzi o to ?e mam marker z gui do zmieniana skin?w (Panel jest w pe?ni zrobiony przez PanaMaszyne) oraz markery z wej?ciami do sklep?w. S? te skrypty ca?kowicie w innych folderach, ale jednak maj? jakie? powi?zania ze sob?. Poniewa? gdy wchodz? w marker do sklepu pokazuje mi panel do wybierania skin?w, z tym ?e w tle spadam, a skiny mi si? nie zmieniaj?. Prosz? o pomoc.
Podpis
Status prac nad Time to play RPG 25%
Wysłany: 2014-06-27, 22:01
maciek3286
LUA Developer
Wiek: 26 Na forum: 5201 dni Posty: 230
Nick w MP: maciek00
Piwa : 3207
Pozmieniaj zmienne w obu clientach i powinno wszystko dzia?a?.
Podpis
"Ludzie będą zawsze dla ciebie źli, jeżeli konieczność nie zmusi ich do tego, by byli dobrzy" ~~ Niccolò Machiavelli
Wysłany: 2014-06-27, 22:14
Maciąg
Wiek: 26 Na forum: 4376 dni Posty: 211
Nick w MP: Dawirzo
Piwa : 149
Gdzie s? te zmienne? Mo?e podam ci kod to mi zmienisz Daje
Podpis
Status prac nad Time to play RPG 25%
Wysłany: 2014-06-28, 14:16
maciek3286
LUA Developer
Wiek: 26 Na forum: 5201 dni Posty: 230
Nick w MP: maciek00
Piwa : 3207
Wysłany: 2014-06-28, 14:28
MeeShuffle
Programista/Grafik
Wiek: 32 Na forum: 4394 dni Posty: 2758
Nick w MP: Shuffle
Piwa : 8575
Poka? ten kod ode mnie, mo?liwe, ?e pomin??em co?
Wysłany: 2014-06-28, 17:19
Maciąg
Wiek: 26 Na forum: 4376 dni Posty: 211
Nick w MP: Dawirzo
Piwa : 149
Kod Pana Maszyny :
Client:
Kod:
mojeW,mojeH = 640, 480
sW,sH = guiGetScreenSize()
width, height = (sW/mojeW), (sH/mojeH)
--Okno g??wne
okno_glowne = guiCreateWindow(247*width, 79*height, 236*width, 322*height, "Ubrania Copyright @ PanMaszyna", false)
guiWindowSetSizable(okno_glowne, false)
guiSetVisible ( okno_glowne, false )
grid = guiCreateGridList(25*width, 35*height, 186*width, 209*height, false, okno_glowne)
column = guiGridListAddColumn(grid, "ID", 1)
button_ok = guiCreateButton(25*width, 252*height, 82*width, 37*height, "Za??? ( 1500$ )", false, okno_glowne)
button_close = guiCreateButton(129*width, 252*height, 82*width, 37*height, "Zamknij", false, okno_glowne)
label = guiCreateLabel(85*width, 294*height, 146*width, 22*height, "FunnyPlaying™ 1.0", false, okno_glowne)
guiLabelSetHorizontalAlign(label, "center", false)
guiLabelSetVerticalAlign(label, "center")
marker_wejscia = createMarker ( -2035.9000244141, 181.89999389648, 27.799999237061, "cylinder", 2, 255, 0, 255 )
addEventHandler ( "onClientMarkerHit", root, function ( elementWejsciowy, _, _ )
if getLocalPlayer() ~= elementWejsciowy then return end
guiSetVisible ( okno_glowne, true )
showCursor ( true )
liczba = 0
guiGridListClear ( grid )
for i = 1, 299 do
liczba = liczba+1
row = guiGridListAddRow ( grid )
guiGridListSetItemText ( grid, row, column, liczba, false, false )
end
ped = createPed ( 0, -2521.98120, -653.86517, 147.90631, 60 )
setElementData ( ped, "ubrania", true )
setCameraMatrix ( -2525.11426, -653.52155, 147.90631, -2522.45166, -654.48364, 147.90631 )
end)
addEventHandler ( "onClientGUIClick", root, function()
if source == button_close then
guiSetVisible ( okno_glowne, false )
showCursor ( false )
setCameraTarget ( getLocalPlayer(), getLocalPlayer() )
for _,v in ipairs ( getElementsByType ( "ped" )) do
if getElementData ( v, "ubrania" ) then
destroyElement ( v )
end
setElementFrozen ( getLocalPlayer(), true )
setTimer ( setElementFrozen, 1000, 1, getLocalPlayer(), false )
end
elseif source == grid then
wybrany_row, wybrany_Col = guiGridListGetSelectedItem( grid )
id = guiGridListGetItemText( grid, wybrany_row, wybrany_Col )
if id == "" then return end
setElementModel ( ped, tonumber(id) )
elseif source == button_ok then
wybrany_row1, wybrany_Col1 = guiGridListGetSelectedItem( grid )
id_skina = guiGridListGetItemText( grid, wybrany_row1, wybrany_Col1 )
triggerServerEvent ( "zaloz", getLocalPlayer(), id_skina )
end
end)
Serwer:
Kod:
addEvent ( "zaloz", true )
addEventHandler ( "zaloz", root, function ( id_skina )
id = tonumber ( id_skina )
kasa = getPlayerMoney ( source )
if kasa < 10 then
outputChatBox ( "[DM] PanMaszyna : Nie posiadasz 1500 $.", source, 255, 255, 255 )
return end
setElementModel ( source, id )
takePlayerMoney ( source, 10 )
outputChatBox ( "[DM] PanMaszyna : Ubranie zmienione. Mo?esz wyj??.", source, 255, 255, 255 )
end)
Podpis
Status prac nad Time to play RPG 25%
Wysłany: 2014-06-28, 17:32
MeeShuffle
Programista/Grafik
Wiek: 32 Na forum: 4394 dni Posty: 2758
Nick w MP: Shuffle
Piwa : 8575
mojeW , mojeH = 640 , 480
sW , sH = guiGetScreenSize ()
width , height = ( sW / mojeW ), ( sH / mojeH )
-- Okno g ?? wne
okno_glowne = guiCreateWindow ( 247 * width , 79 * height , 236 * width , 322 * height , "Ubrania Copyright @ PanMaszyna" , false )
guiWindowSetSizable ( okno_glowne , false )
guiSetVisible ( okno_glowne , false )
grid = guiCreateGridList ( 25 * width , 35 * height , 186 * width , 209 * height , false , okno_glowne )
column = guiGridListAddColumn ( grid , "ID" , 1 )
button_ok = guiCreateButton ( 25 * width , 252 * height , 82 * width , 37 * height , "Za??? ( 1500$ )" , false , okno_glowne )
button_close = guiCreateButton ( 129 * width , 252 * height , 82 * width , 37 * height , "Zamknij" , false , okno_glowne )
label = guiCreateLabel ( 85 * width , 294 * height , 146 * width , 22 * height , "FunnyPlaying™ 1.0" , false , okno_glowne )
guiLabelSetHorizontalAlign ( label , "center" , false )
guiLabelSetVerticalAlign ( label , "center" )
marker_wejscia = createMarker ( - 2035.9000244141 , 181.89999389648 , 27.799999237061 , "cylinder" , 2 , 255 , 0 , 255 )
addEventHandler ( "onClientMarkerHit" , root , function ( elementWejsciowy , _ , _ )
if getLocalPlayer () ~= elementWejsciowy then return end
guiSetVisible ( okno_glowne , true )
showCursor ( true )
liczba = 0
guiGridListClear ( grid )
for i = 1 , 299 do
liczba = liczba + 1
row = guiGridListAddRow ( grid )
guiGridListSetItemText ( grid , row , column , liczba , false , false )
end
ped = createPed ( 0 , - 2521.98120 , - 653.86517 , 147.90631 , 60 )
setElementData ( ped , "ubrania" , true )
setCameraMatrix ( - 2525.11426 , - 653.52155 , 147.90631 , - 2522.45166 , - 654.48364 , 147.90631 )
end )
addEventHandler ( "onClientGUIClick" , marker_wejscia , function()
if source == button_close then
guiSetVisible ( okno_glowne , false )
showCursor ( false )
setCameraTarget ( getLocalPlayer (), getLocalPlayer () )
for _ , v in ipairs ( getElementsByType ( "ped" )) do
if getElementData ( v , "ubrania" ) then
destroyElement ( v )
end
setElementFrozen ( getLocalPlayer (), true )
setTimer ( setElementFrozen , 1000 , 1 , getLocalPlayer (), false )
end
elseif source == grid then
wybrany_row , wybrany_Col = guiGridListGetSelectedItem ( grid )
id = guiGridListGetItemText ( grid , wybrany_row , wybrany_Col )
if id == "" then return end
setElementModel ( ped , tonumber ( id ) )
elseif source == button_ok then
wybrany_row1 , wybrany_Col1 = guiGridListGetSelectedItem ( grid )
id_skina = guiGridListGetItemText ( grid , wybrany_row1 , wybrany_Col1 )
triggerServerEvent ( "zaloz" , getLocalPlayer (), id_skina )
end
end )
Wysłany: 2014-06-28, 18:28
Maciąg
Wiek: 26 Na forum: 4376 dni Posty: 211
Nick w MP: Dawirzo
Piwa : 149
Ju? poprawione? Dzi?kuj? Ci bardzo ! Dzi?kuj? ! 3maj
Podpis
Status prac nad Time to play RPG 25%
Tagi: markery
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: