Jump to content

Añadir Paintjobs custom


Recommended Posts

Posted

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?

 

The greatest pleasure of life is doing what people think impossible

 

El mayor placer de la vida es hacer aquello que la gente cree imposible

Posted
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.

 

The greatest pleasure of life is doing what people think impossible

 

El mayor placer de la vida es hacer aquello que la gente cree imposible

Posted
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ículoLo ú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
)

 

yDORrdn.png

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...