Jump to content

Apply shaders to individual infernus (ALMOST WORKING)


Slim

Recommended Posts

Okay well for example:
I wanna have zebra skin on my infernus while other infernus does not have it

I got a modeler to make me a custom UV mapped infernus, and a little demo script, the best he could, of the shader apply script using links I gave him.
But the problem is, what he made me, applies to every existing infernus in the GTA SA world, instead of individual infernus.

Anybody willing to take a crack at this?
Or does anyone know how to apply the shader to individial infernus successfully?
If someone can give me this script, or fix the one provided, and wrap individual infernus with custom shader, I have scripters ready to implement the options for choosing skins.
On Dutchmans release post, he mentions that the script is easy to work with...
Someone plz help?

Super helpful links:
 

https://community.multitheftauto.com/index.php?p=resources&s=details&id=14436
https://forum.multitheftauto.com/topic/96136-rel-texture-replacement-shader-car-wraps-etc/
https://wiki.multitheftauto.com/wiki/EngineApplyShaderToWorldTexture
https://forum.multitheftauto.com/topic/80564-adding-mutiple-skins-on-one-model/
https://forum.multitheftauto.com/topic/80796-solved-shader/

 

Link to comment

Forgot to mention:
There's a really good chance that the working script my modeler friend made for me, only isn't working because of "GetElement".

Plz help


Example:
With OutputChatbox, 2 of ways you can go, only your client gets the message, or the whole gets it.
Or when you place a marker, the whole server can see it, or just your client.
And like I said, this script applies the shader to every existing infernus instead of individual.


I need someone to take a quick look at the script please, I'm almost sure it's a tiny fix...

 

@CodyJ(L)

remap_start = createMarker(2478, -1666, 14, "corona", 20, 255, 255, 0, 255)
remap1_start = createMarker(2550, -1666, 14, "corona", 20, 255, 255, 0, 255)
shader_stop = createMarker(2478, -1690, 14, "corona", 10, 255, 255, 0, 255)
local shader = dxCreateShader("tex.fx")

addEventHandler("onClientMarkerHit", getRootElement(), function(player, matching)
	if player ~= getLocalPlayer() then return end
	if not isPedInVehicle(player) then return end
	vehicle = getPedOccupiedVehicle(player)
	if source == remap_start then
		startremap()
	elseif source == remap1_start then
		startremap1()
	elseif source == shader_stop then
		stopshader()
	end
end)

function startremap()
	if shader then
		dxSetShaderValue(shader, "gTexture", dxCreateTexture("remap.png"))
		engineApplyShaderToWorldTexture(shader, "remap")
	end
end

function startremap1()
	if shader then
		dxSetShaderValue(shader, "gTexture", dxCreateTexture("remap1.png"))
		engineApplyShaderToWorldTexture(shader, "remap")
	end
end

function stopshader()
	engineRemoveShaderFromWorldTexture(shader, "remap")
end

 

Edited by Justin|X5|
Link to comment
  • 4 weeks later...
  • Discord Moderators
On 6/23/2017 at 23:08, Justin|X5| said:

Mmmmm did enough research and annoyed enough scripters to finally get it working.
Thanks everybody.

Could you please write down how to solve it?

Link to comment

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