Wysłany: 2014-06-27, 14:31
Maciąg
Wiek: 26 Na forum: 4376 dni Posty: 211
Nick w MP: Dawirzo
Piwa : 149
Wysłany: 2014-06-27, 14:35
MeeShuffle
Programista/Grafik
Wiek: 32 Na forum: 4394 dni Posty: 2758
Nick w MP: Shuffle
Piwa : 8575
Nie robi? tego cz?sto ale udost?pniam Ci m?j skrypt z nowego projektu :
Client :
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 ( - 316.65417 , 1075.10742 , 18.58669 , "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 )
Server :
addEvent ( "zaloz" , true )
addEventHandler ( "zaloz" , root , function ( id_skina )
id = tonumber ( id_skina )
kasa = getPlayerMoney ( source )
if kasa < 1500 then
outputChatBox ( "[DM] PanMaszyna : Nie posiadasz 1500 $." , source , 255 , 255 , 255 )
return end
setElementModel ( source , id )
takePlayerMoney ( source , 1500 )
outputChatBox ( "[DM] PanMaszyna : Ubranie zmienione. Mo?esz wyj??." , source , 255 , 255 , 255 )
end )
Wysłany: 2014-06-27, 16:34
Maciąg
Wiek: 26 Na forum: 4376 dni Posty: 211
Nick w MP: Dawirzo
Piwa : 149
A gdzie mam wklei? server a gdzie client ? A tak po za tym to dzi?ki ! Jeste? super cz?owiekiem ! MASZ
Podpis
Status prac nad Time to play RPG 25%
Wysłany: 2014-06-27, 18:17
Piorun
Wiek: 32 Na forum: 6712 dni Posty: 1837
Nick w MP: Piorun
Piwa : 516
Serwer do pliku .lua, kt?ry ustali?e? w mecie, a Client do pliku .lua, kt?ry ustali?e? w mecie ...
Oczywi?cie chodzi mi o meta.xml, w kt?rej ustalasz kt?re pliki s? ze strony serwera, a kt?re klienta.
Wysłany: 2014-06-27, 18:32
Maciąg
Wiek: 26 Na forum: 4376 dni Posty: 211
Nick w MP: Dawirzo
Piwa : 149
No to tak, wiem, ale to w jednym folderze wklei? do resource ?
Podpis
Status prac nad Time to play RPG 25%
Wysłany: 2014-06-27, 18:56
Piorun
Wiek: 32 Na forum: 6712 dni Posty: 1837
Nick w MP: Piorun
Piwa : 516
Wysłany: 2014-06-27, 19:13
Maciąg
Wiek: 26 Na forum: 4376 dni Posty: 211
Nick w MP: Dawirzo
Piwa : 149
PanMaszyna Dzia?a super, dzi?ki, ale mam jeszcze pytanie, czy moge co? zmieni?, chodzi o to ?e jak kto? kasy nie ma to ?eby nie pisa?o [DM]PanMaszyna: Nie masz 1500$, tylko chc? ?eby pia?o [INFO]Nie masz tylko hajsu
Podpis
Status prac nad Time to play RPG 25%
Wysłany: 2014-06-27, 22:49
MeeShuffle
Programista/Grafik
Wiek: 32 Na forum: 4394 dni Posty: 2758
Nick w MP: Shuffle
Piwa : 8575
Zmieniasz tekst po stronie servera.
Tagi: gui :: skiny
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: