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

Wysłany: 2014-06-30, 15: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

Witam! Pisz? skin shop od zera i mam problem. Nie wiem jak zrobi? aby wszystko wy?wietla?o si? po wej?ciu w marker. Za pomoc :piwo:
Strony serwera nie mam, i zastanawiam si? czy inni b?d? widzieli mojego skina?
Kod:
Sklep = {
    gridlist = {},
    staticimage = {},
    button = {}
}

Sklep.button[1] = guiCreateButton(78435011735"Zakup"false)
Sklep.button[2] = guiCreateButton(78440811735"Zamknij"false)
Sklep.gridlist[1] = guiCreateGridList(378279176248false)
guiGridListAddColumn(Sklep.gridlist[1], "Skiny"0.9)
guiGridListSetItemText(Sklep.gridlist[1], 01"Garnitur"falsefalse)
guiGridListSetItemText(Sklep.gridlist[1], 11"Miejskie"falsefalse)
guiGridListSetItemText(Sklep.gridlist[1], 21"Diler"falsefalse)
guiSetVisible(Sklep.button[1], false)
guiSetVisible(Sklep.button[2], false)
guiSetVisible(Sklep.gridlist[1], false)

function tlo()
        dxDrawRectangle(368269553268tocolor(000227), false)
        dxDrawText("Sklep Skin"530246755287tocolor(255255255255), 1.30"bankgothic""left""top"falsefalsetruefalsefalse)
end
 
 function(player)
 if (local player == getLocalPlayer()) then
addEventHandler("onClientRender"roottlotrue )
guiSetVisible(Sklep.button[1], true)
guiSetVisible(Sklep.button[2], true)
guiSetVisible(Sklep.gridlist[1], true)


function wyjscie()
    guiSetVisible(Sklep.button[1], false)
    guiSetVisible(Sklep.button[2], false)
    guiSetVisible(Sklep.gridlist[1], false)
    showCursor false )
end
addEventHandler("onClientGUIClick"Sklep.button[2], wyjsciefalse)

function onClick()
local wyb guiGridListGetItemText(Sklep.gridlist[1], guiGridListGetSelectedItem (Sklep.gridlist[1]), 1)
if wyb == "Garnitur" then
Sklep.staticimage[1] = guiCreateStaticImage(589329142124"img/163.png"false)
setPlayerSkin(localPlayer163)
end
end

addEventHandler "onClientGUIClick"Sklep.gridlist[1], onClickfalse )

function onClick()
local wyb guiGridListGetItemText(Sklep.gridlist[1], guiGridListGetSelectedItem (Sklep.gridlist[1]), 1)
if wyb == "Miejskie" then
Sklep.staticimage[1] = guiCreateStaticImage(589329142124"img/217.png"false)
setPlayerSkin(localPlayer217)
end
end

addEventHandler "onClientGUIClick"Sklep.gridlist[1], onClickfalse )

function onClick()
local wyb guiGridListGetItemText(Sklep.gridlist[1], guiGridListGetSelectedItem (Sklep.gridlist[1]), 1)
if wyb == "Gangsterskie" then
Sklep.staticimage[1] = guiCreateStaticImage(589329142124"img/291.png"false)
setPlayerSkin(localPlayer291)
end
end

addEventHandler "onClientGUIClick"Sklep.gridlist[1], onClickfalse )


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-06-30, 15:11


MeeShuffle

Programista/Grafik






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

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

 if (local player == getLocalPlayer()) then


Co to jest ?

Dam Ci m?j skin shop kt?ry robi?em ale nie przyda? mi si? :

C-side :



mojeW,mojeH 640480
sW,sH guiGetScreenSize()
widthheight = (sW/mojeW), (sH/mojeH)



--Okno g??wne

okno_glowne guiCreateWindow(247*width79*height236*width322*height"Ubrania Copyright @ PanMaszyna"false)
guiWindowSetSizable(okno_glownefalse)
guiSetVisible okno_glownefalse )

grid guiCreateGridList(25*width35*height186*width209*heightfalseokno_glowne)
column guiGridListAddColumn(grid"ID"1)
button_ok guiCreateButton(25*width252*height82*width37*height"Za??? ( 1500$ )"falseokno_glowne)

button_close guiCreateButton(129*width252*height82*width37*height"Zamknij"falseokno_glowne)

label guiCreateLabel(85*width294*height146*width22*height"FunnyPlaying™ 1.0"falseokno_glowne)
guiLabelSetHorizontalAlign(label"center"false)
guiLabelSetVerticalAlign(label"center")

marker_wejscia createMarker ( -316.654171075.1074218.58669"cylinder"22550255 )


addEventHandler "onClientMarkerHit"root, function ( elementWejsciowy_)
    if getLocalPlayer() ~= elementWejsciowy then return end
    guiSetVisible okno_glownetrue )
    showCursor true )
    liczba 0
    guiGridListClear grid )
    for 1299 do
    liczba liczba+1
        row guiGridListAddRow grid )
        guiGridListSetItemText gridrowcolumnliczbafalsefalse )
    end
        ped createPed 0, -2521.98120, -653.86517147.9063160 )
        setElementData ped"ubrania"true )
        setCameraMatrix ( -2525.11426, -653.52155147.90631, -2522.45166, -654.48364147.90631 )
end)
        
        
        
addEventHandler "onClientGUIClick"root, function()
    if source == button_close then
        guiSetVisible okno_glownefalse )
        showCursor false )
        setCameraTarget getLocalPlayer(), getLocalPlayer() )
        for _,v in ipairs getElementsByType "ped" )) do
            if getElementData v"ubrania" then
                destroyElement )
            end
            setElementFrozen getLocalPlayer(), true )
            setTimer setElementFrozen10001getLocalPlayer(), false )
        end
    elseif source == grid then
        wybrany_rowwybrany_Col guiGridListGetSelectedItemgrid )
        id guiGridListGetItemTextgridwybrany_rowwybrany_Col )
        if id == "" then return end
        setElementModel pedtonumber(id) )
    elseif source == button_ok then
        wybrany_row1wybrany_Col1 guiGridListGetSelectedItemgrid )
        id_skina guiGridListGetItemTextgridwybrany_row1wybrany_Col1 )
        triggerServerEvent "zaloz"getLocalPlayer(), id_skina )
    end
end)







s-side :

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 $."source255255255 )
    return end
    setElementModel sourceid )
    takePlayerMoney source1500 )
    outputChatBox "[DM] PanMaszyna : Ubranie zmienione. Mo?esz wyj??."source255255255 )
end)


Podpis

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

 
Wysłany: 2014-06-30, 15:34


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

PanMaszyna, Piwo masz, ale mi tu chodzi?o aby?cie mi poprawili to co jest ?le. Poniewa? chcia?bym nie u?ywa? guiCreate tylko dxDraw jako t?o..

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-06-30, 15:47


MeeShuffle

Programista/Grafik






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

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

To zmie? na Swoje :) Ale oczywi?cie dopasuj pod rozdzielczo?? bo w tamtym kodzie nie by?o.

Podpis

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

 
Tagi: skin :: shop
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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