Annas Posted February 27, 2016 Share Posted February 27, 2016 How to get an object Texture Name , so i can use "engineApplyShaderToWorldTexture" without writting the texture name , i tried this but it's not working.. local LogiC_gate = createObject ( 980, 0, 0, 0, 0, 0, 0 ) -- FAKE ID's applyCustomTextures( LogiC_gate, "testing") function applyCustomTextures(object, texture) local shaderElement = dxCreateShader ( "shader.fx", 0, 0, false, "object" ) texture = dxCreateTexture( "textures/"..texture..".png" ) dxSetShaderValue( shaderElement, "Tex0", texture) texturename = engineGetModelTextureNames(object) --- THIS engineApplyShaderToWorldTexture( shaderElement, texturename, object) end Link to comment
Ren_712 Posted February 27, 2016 Share Posted February 27, 2016 engineApplyShaderToWorldTexture( shaderElement, "*", object) Link to comment
Annas Posted February 27, 2016 Author Share Posted February 27, 2016 Please how to make "All able to see the shader on that object" Please help me and thx Link to comment
ozulus Posted February 27, 2016 Share Posted February 27, 2016 addEventHandler( "onClientElementStreamIn", getRootElement( ), function ( ) if getElementType( source ) == "object" then applyCustomTextures( source, "testing") --[b]edited take it again..[/b] end end ); Link to comment
Annas Posted February 27, 2016 Author Share Posted February 27, 2016 Please help me , only who go to the gate able to see the shader.. I wanna all can see it please help me Link to comment
KariiiM Posted February 27, 2016 Share Posted February 27, 2016 create the object in the server side Link to comment
Annas Posted February 28, 2016 Author Share Posted February 28, 2016 I wont start a new topic as im talking about the same subject.. I would like to make this , on player quit , save the EngineApplyShaderToWorldTexture .. The Problem: 1- change the texture 2- All able to see that object with that texture 3- i'll Quit/left the game 4- login again 8- I wont see the object with the New texture that i made before i reconnect 9- But others (who didnt reconnect) able to see the object with new texture shader. (So when a player reconnect, the new texture will lost, so i should applyShaderToWorldTexture again ..) (I need it when a player Reconnect, it been saved, so when he quit & join again he will see the New texture that i made) Wish you understand my bad english 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