TheBakkeseKing Posted January 23, 2019 Share Posted January 23, 2019 Hola, intento hacer un Script para poder meter, los PaintJobs que diseñes para que la gente los pueda ver. Pero no se por donde empezar. ¿Me pueden ayudar? Link to comment
aka Blue Posted January 24, 2019 Share Posted January 24, 2019 Utiliza shaders reemplazando la textura del paintjob del vehículo. Link to comment
TheBakkeseKing Posted January 24, 2019 Author Share Posted January 24, 2019 15 minutes ago, aka Blue said: Utiliza shaders reemplazando la textura del paintjob del vehículo. El problema es que no se hacerlo. Es decir me descarge varios scripts que lo hacen pero ninguno funciona correctamente. Y al intentar hacerlo se me hace complicado. Link to comment
aka Blue Posted January 24, 2019 Share Posted January 24, 2019 3 hours ago, TheBakkeseKing said: El problema es que no se hacerlo. Es decir me descarge varios scripts que lo hacen pero ninguno funciona correctamente. Y al intentar hacerlo se me hace complicado. La textura que reemplaza los paintjobs suele variar para cada vehículo. Lo único que necesitas es crear una textura con dxCreateTexture y aplicarla con un shader de sustitución de texturas (te lo dejaré abajo) al vehículo en cuestión (Elegy). Espero puedas hacerlo shader.fx // Variable to fetch the texture from the script texture gTexture; // My nice technique. Requires absolutely no tools, worries nor skills technique TexReplace { pass P0 { // Set the texture Texture[0] = gTexture; // LET THE MAGIC DO ITS MAGIC! } } client.lua addCommandHandler( "pintura", function() local veh = getPedOccupiedVehicle( getLocalPlayer() ) if veh then if getVehicleNameFromModel( getElementModel(veh) ) == "Elegy" then local textura = dxCreateTexture( "TEXTURA.png" ) -- Cambias TEXTURA.png por el archivo del paintjob personalizado local shader, tec = dxCreateShader( "shader.fx", 1000, 0, false ) -- Cargamos el shader engineApplyShaderToWorldTexture ( shader, "elegy1body256", veh ) -- Aplicamos el shader al vehiculo dxSetShaderValue ( shader, "gTexture", textura ) -- Colocamos que la textura a cambiar sea la cargada anteriormente end end end ) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now