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

Wysłany: 2014-11-30, 14:52


PsychOTV

LUA Skrypter






Wiek: 26
Na forum: 4252 dni
Posty: 10
Nick w MP: Tom.

Piwa: 1

Respekt: 50

Tak jak w temacie

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-11-30, 20:53


MeeShuffle

Programista/Grafik






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

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

urywek kodu z mojego zapisu XML :


maska getVehicleUpgradeOnSlot v) or nil
            spoiler getVehicleUpgradeOnSlot v) or nil
            roof getVehicleUpgradeOnSlot v) or nil
            hydraulika getVehicleUpgradeOnSlot v) or nil
            nitro getVehicleUpgradeOnSlot v) or nil
            felgi getVehicleUpgradeOnSlot v12 ) or nil
            wydech getVehicleUpgradeOnSlot v13 ) or nil
            zderzak_p getVehicleUpgradeOnSlot v14 ) or nil
            zderzak_t getVehicleUpgradeOnSlot v15 ) or nil
            xmlNodeSetAttribute child"maska"tonumber(maska) )
            xmlNodeSetAttribute child"spoiler"tonumber(spoiler) )
            xmlNodeSetAttribute child"roof"tonumber(roof) )
            xmlNodeSetAttribute child"hydraulika"tonumber(hydraulika) )
            xmlNodeSetAttribute child"nitro"tonumber(nitro) )
            xmlNodeSetAttribute child"felgi"tonumber(felgi) )
            xmlNodeSetAttribute child"wydech"tonumber(wydech) )
            xmlNodeSetAttribute child"zderzak_p"tonumber(zderzak_p) )
            xmlNodeSetAttribute child"zderzak_t"tonumber(zderzak_t) )


Podpis

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

 
Wysłany: 2014-11-30, 22:09


PsychOTV

LUA Skrypter






Wiek: 26
Na forum: 4252 dni
Posty: 10
Nick w MP: Tom.

Piwa: 1

Respekt: 50

Jak to zrobi? jeszcze ?e je?eli jest zapisany to setelement data

[ Dodano: 2014-11-30, 22:17 ]
M?g?by? poda? urywek z setelementdata?

[ Dodano: 2014-11-30, 22:28 ]
mo?esz poda? setElementData tuningu onResourceStart?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-11-30, 22:50


MeeShuffle

Programista/Grafik






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

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

Nie musisz tak spami? tymi postami. Nie jestem 24/7 na forum.

Nie czaje o co Ci chodzi z jakimi? urywkami, poda?em Ci funkcje potrzebne do zrobienia tego.

Podpis

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

 
Wysłany: 2014-11-30, 23:01


Terr9909

Skrypter LUA






Wiek: 26
Na forum: 4234 dni
Posty: 346
Nick w MP: Split

Piwa: 1043

Respekt: 182,8
Respekt: 182,8Respekt: 182,8

Tak powinno mniej wi?cej wygl?da? u?ycie tuningu do pojazdu :)

v.tuning split(v.tuning",")
for i,v in ipairs(v.tuning) do addVehicleUpgrade(pojazdtonumber(v)) end


i potem tylko oddzielasz przecinkami cz??ci 1010, 1011 itp

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-11-30, 23:07


MeeShuffle

Programista/Grafik






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

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

Split, my?l?, ?e Twoja wersja b?dzie dla niego troch? ci??ka.

Podpis

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

 
Wysłany: 2014-11-30, 23:12


PsychOTV

LUA Skrypter






Wiek: 26
Na forum: 4252 dni
Posty: 10
Nick w MP: Tom.

Piwa: 1

Respekt: 50

Dobra dzia?a zrobi?em tak
nitro xmlNodeGetAttribute v"nitro"tonumber(nitro) )
 addVehicleUpgrade autonitro )


auto to odno?nik do locala :D dzi?kuje ci Shuffle

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-12-01, 12:03


dudeks







Wiek: 31
Na forum: 6576 dni
Posty: 171

Piwa: 89

Respekt: 105,3
Respekt: 105,3

function getVehicleTuning veh )
    local i
    local vehPanel ''
    for i=016 do
        local vb ''
        if i>0 then
            vb vehPanel..';'
        end
        vehPanel vb.. getVehicleUpgradeOnSlot (vehi)
    end
    return vehPanel
end

function setVehicleTuning veharr )
    if arr then
        local arrx split(arrstring.byte(";"))
        local i
        for i=016 do
            addVehicleUpgrade veharrx[i] )
        end
    end
    return true
end


Mo?esz tak?e u?y? tego.

Postaw piwo autorowi tego posta
 

 
Tagi: jak :: zrobić :: zapis :: tuningu :: xml
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Jak zrobić zapis tuningu na xml 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