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

Wysłany: 2020-08-12, 16:06


Matikmontana

Modern Stories






Wiek: 22
Na forum: 2473 dni
Posty: 423
Nick w MP: Mazeusz*

Piwa: 1015

Respekt: 130
Respekt: 130

Ostrzeżeń: 60%
Cze??, przypadkiem zauwa?y?em, ?e skrypt na nak?adanie textur nak?ada txt na ka?de auto po respie z przecho. Moje pytanie jest gdzie jest b??d w nak?adaniu txt, i co trzeba zrobi? aby to dzia?a?o.

addEventHandler"onClientRender"resourceRoot, function()
    for i,v in pairs(getElementsByType("vehicle")) do
        mask getElementData(v"maskLampa")
     if mask then
     if lastMask[v] ~= mask then
     
     if mask == 1 then
         texture1 dxCreateTexture('i/blue_neon_hq.jpg')
         dxSetShaderValue(shader,'gTexture',texture1)
         engineApplyShaderToWorldTexture(shader,"vehiclelightson128",v)


     elseif mask == 2 then 
         texture2 dxCreateTexture('i/Green Mustang.jpg')
         dxSetShaderValue(shader,'gTexture',texture2)
         engineApplyShaderToWorldTexture(shader,"vehiclelightson128",v)


     elseif mask == 3 then
         texture3 dxCreateTexture('i/hq.jpg')
         dxSetShaderValue(shader,'gTexture',texture3)
         engineApplyShaderToWorldTexture(shader,"vehiclelightson128",v)


     elseif mask == 4 then
         texture4 dxCreateTexture('i/Red BMW.jpg')
         dxSetShaderValue(shader,'gTexture',texture4)
         engineApplyShaderToWorldTexture(shader,"vehiclelightson128",v)


     elseif mask == 5 then
         texture5 dxCreateTexture('i/Red Canibus.jpg')
         dxSetShaderValue(shader,'gTexture',texture5)
         engineApplyShaderToWorldTexture(shader,"vehiclelightson128",v)


     elseif mask == 6 then
         texture6 dxCreateTexture('i/Red Double Stripes.jpg')
         dxSetShaderValue(shader,'gTexture',texture6)
         engineApplyShaderToWorldTexture(shader,"vehiclelightson128",v)


     elseif mask == 7 then
         texture7 dxCreateTexture('i/Red Slanted Stripes.jpg')
         dxSetShaderValue(shader,'gTexture',texture7)
         engineApplyShaderToWorldTexture(shader,"vehiclelightson128",v)


     elseif mask == 8 then
         texture8 dxCreateTexture('i/red_alfa_romeo.jpg')
         dxSetShaderValue(shader,'gTexture',texture8)
         engineApplyShaderToWorldTexture(shader,"vehiclelightson128",v)


     elseif mask == 9 then
         texture9 dxCreateTexture('i/red_double_rounded_rectangles.jpg')
         dxSetShaderValue(shader,'gTexture',texture9)
         engineApplyShaderToWorldTexture(shader,"vehiclelightson128",v)


     elseif mask == 10 then
         texture10 dxCreateTexture('i/undercover.jpg')
         dxSetShaderValue(shader,'gTexture',texture10)
         engineApplyShaderToWorldTexture(shader,"vehiclelightson128",v)
        
     else
         engineRemoveShaderFromWorldTexture(shader,"vehiclelightson128"v)
     end
         lastMask[v] = getElementDatav"maskLampa" )
     end
     end
     end
end)


Podpis


Modern Stories
Discord
https://discord.gg/MRJSYq8
Forum
https://msmta.pl
Panel Gracza
https://panel.msmta.pl
Postaw piwo autorowi tego posta
 

 
Wysłany: 2020-08-13, 12:31


Hemoglobina

Tylko Hema






Wiek: 29
Na forum: 3397 dni
Posty: 89
Nick w MP: Answer

Piwa: 1386

Respekt: 90

Z kodu wychodzi, ?e ka?de auto, kt?re wyci?gasz z przechowalni posiada element date "maskLampa". Wypisz sobie outputChatBoxem czy faktycznie j? posiada.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2020-08-14, 16:22


Matikmontana

Modern Stories






Wiek: 22
Na forum: 2473 dni
Posty: 423
Nick w MP: Mazeusz*

Piwa: 1015

Respekt: 130
Respekt: 130

Ostrzeżeń: 60%
Auto posiada eldate maskLamp, zrobi?em ?e nadaje txt dopiero po wsiadaniu do auta i jest dobrze, czyli daje prawid?owo maskowanie na auto kt?re posiada eldate

Postaw piwo autorowi tego posta
 

 
Tagi: nakładanie :: shadera :: txt
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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