Kacpex52
Wiek: 25 Na forum: 4323 dni Posty: 61
Nick w MP: Kacpex52
Piwa : 10
Witam, mam problem odno?nie tworzenia shader?w na pojazdy. Mam kod po stronie klienta ale nie mog? za ?adne skarby wzi?? i go wywo?a?.
Server:
local przyczepa = createVehicle ( 611 , 488.08643 , - 1819.10852 , 6.3 , 0 , 0 , 180 )
setVehicleColor ( przyczepa , 223 , 223 , 223 )
setVehicleFrozen ( przyczepa , true )
local x , y , z = getElementPosition ( przyczepa , x , y , z , 0 , 0 , 0 )
car = createVehicle ( 472 , x , y , z , 0 , 0 , 180 )
setVehicleColor ( car , 219 , 23 , 4 , 253 , 190 , 0 )
setVehicleVariant ( car , 255 , 255 )
attachElements ( car , przyczepa , 0 , - 0.5 , - 0.1 )
triggerClientEvent ( 'nadaj:shadery' , root , car )
Client:
local Pojazdy = {}
local Pojazdy2 = {}
function shader ( vehicle )
Pojazdy [ vehicle ] = dxCreateShader ( 'texreplace.fx' , 0 , 0 , true , 'vehicle' );
local textureElement = dxCreateTexture ( 's.png' );
Pojazdy2 [ vehicle ] = dxCreateShader ( 'texreplace2.fx' , 0 , 0 , false , 'vehicle' );
local textureElement2 = dxCreateTexture ( '02.png' );
dxSetShaderValue ( Pojazdy [ vehicle ], 'gTexture' , textureElement );
engineApplyShaderToWorldTexture ( Pojazdy [ vehicle ], "remapsprinterbody512" , vehicle );
dxSetShaderValue ( Pojazdy2 [ vehicle ], 'gTexture' , textureElement2 );
engineApplyShaderToWorldTexture ( Pojazdy2 [ vehicle ], "coast928bit128b" , vehicle );
end
addEvent ( 'nadaj:shadery' , true )
addEventHandler ( 'nadaj:shadery' , root , shader )
debugscript: