toxicsmoke11 Posted March 22, 2015 Posted March 22, 2015 hey i have a question if i have a shader (like custom weapon texture for example) how can i make it that everyone can see that I have that texture, but their guns still remain with default weapon texture?
MIKI785 Posted March 22, 2015 Posted March 22, 2015 Restrict it to particular element... see wiki: engineApplyShaderToWorldTexture targetElement argument Lua Scripter Owner of mshost.cz MTA portal.
toxicsmoke11 Posted March 22, 2015 Author Posted March 22, 2015 i think that i've tried using that targetElement before to myself, and only i could see the shader while others seen default on me D: i need that others see my custom texture while they have default one(so its basically 2 textures of same weapon at same time just on different player)
Gallardo9944 Posted March 23, 2015 Posted March 23, 2015 you can setElementData to players you want to have the shader (serverside) and then apply/remove the shader to/from the players (clientside) using onClientElementDataChange event Code Debugger - Minimalistic MTA debug line replacement
-.Paradox.- Posted March 23, 2015 Posted March 23, 2015 you can setElementData to players you want to have the shader (serverside) and then apply/remove the shader to/from the players (clientside) using onClientElementDataChange event Sometimes it doesn't work as I tried along time ago If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
Gallardo9944 Posted March 24, 2015 Posted March 24, 2015 you can setElementData to players you want to have the shader (serverside) and then apply/remove the shader to/from the players (clientside) using onClientElementDataChange event Sometimes it doesn't work as I tried along time ago Works perfectly for me. Also, you can check vehicle lights shader as an example, downloadable in community.multitheftauto.com Code Debugger - Minimalistic MTA debug line replacement
-.Paradox.- Posted March 29, 2015 Posted March 29, 2015 you can setElementData to players you want to have the shader (serverside) and then apply/remove the shader to/from the players (clientside) using onClientElementDataChange event Sometimes it doesn't work as I tried along time ago Works perfectly for me. Also, you can check vehicle lights shader as an example, downloadable in community.multitheftauto.com Brilliant! Thanks mate If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
Gallardo9944 Posted March 30, 2015 Posted March 30, 2015 You're welcome Code Debugger - Minimalistic MTA debug line replacement
toxicsmoke11 Posted April 1, 2015 Author Posted April 1, 2015 i tried this(not full code) function onJoinHydra(player) if getElementModel(source) ~= 520 then return end if not getElementData(source,"mod") then setElementData(source,"veh",true) end engineApplyShaderToWorldTexture(hydraShader,"hydrabody256",source) end addEventHandler("onClientVehicleEnter",root,onJoinHydra) result: only i can see custom hydra texture, others see the default i need others to usually see default hydras, but if i spawn a hydra and enter it, ONLY that hydra will get custom texture, and everyone will be able to see that cusom texture on my hydra please help
WhoAmI Posted April 1, 2015 Posted April 1, 2015 Just create the vehicle using createVehicle and apply texture to it.
toxicsmoke11 Posted April 1, 2015 Author Posted April 1, 2015 applying the texture wasn't the problem i have fixed the problem by looping through all players in the server, and then applying the shader to that specific vehicle
JR10 Posted April 2, 2015 Posted April 2, 2015 If you remove the targetElement argument, it will automatically apply it to everyone. Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
John Smith Posted April 2, 2015 Posted April 2, 2015 If you remove the targetElement argument, it will automatically apply it to everyone. If he'd do that, he would get what he didnt want: Every hydra would have custom texture If you find my post useful or if it helped you, please like my post Ingame name: ZoeN
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