Absence2 Posted March 5, 2012 Share Posted March 5, 2012 https://community.multitheftauto.com/index.php?p= ... ls&id=3011 It's compiled so I can't change anything though The resource itself is just brilliant and realistic, why I want to edit it because it pops up over the account/register page and can mess things up together with the Text saying a player activated it. Anyone who has a similar shader like this but triggered with a command or know where I can find it? I want it optional at any time to disable / enable it, hence the command triggerering (without the GUI), just enable/disable the vehicle shader. Thank you in advance. Link to comment
Renkon Posted March 5, 2012 Share Posted March 5, 2012 I will ask my friend St3reo if he can.. Link to comment
Absence2 Posted March 6, 2012 Author Share Posted March 6, 2012 I will ask my friend St3reo if he can.. Sounds awesome, thanks Link to comment
Faw[Ful] Posted March 6, 2012 Share Posted March 6, 2012 Would you have missed this one ? : https://community.multitheftauto.com/index.php?p= ... ls&id=3905 Link to comment
Absence2 Posted March 6, 2012 Author Share Posted March 6, 2012 Would you have missed this one ? : https://community.multitheftauto.com/index.php?p= ... ls&id=3905 I did check that, but the Pro Shader resource has far better quality in my opinion and that resource is bigger, pro shader is on 0.5 mb =/ Link to comment
Renkon Posted March 6, 2012 Share Posted March 6, 2012 Hello! St3reo allowed me to post the code. No need to say this is done by him, and I'd recommend you to keep author and name like the same, but you can modify size and all that function box() showCursor(true) local sWidth, sHeight = guiGetScreenSize() local Width,Height = 330,250 local X = (sWidth/2) - (Width/2) local Y = (sHeight/2) - (Height/2) bigWindow = guiCreateWindow(X,Y,Width,Height,"",false) guiWindowSetMovable(bigWindow,false) guiWindowSetSizable(bigWindow,false) guiSetAlpha(bigWindow,0.-- s8) --> botton1 = guiCreateButton(48,70,232,45,"",false,bigWindow) guiSetAlpha(botton1,0) guiSetProperty(botton1,"AlwaysOnTop","true") botton2 = guiCreateButton(49,130,232,45,"",false,bigWindow) guiSetAlpha(botton2,0) guiSetProperty(botton2,"AlwaysOnTop","true") botton3 = guiCreateButton(143,210,46,20,"",false,bigWindow) guiSetAlpha(botton3,0) guiSetProperty(botton3,"AlwaysOnTop","true") imagePanel = guiCreateStaticImage(11,22,310,219,"img/ShaderPanel.png",false,bigWindow) guiMoveToBack (imagePanel , true) guiSetEnabled ( imagePanel, false ) guiSetAlpha(imagePanel,0.9) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()),box) function onGuiClick (button, state, absoluteX, absoluteY) if (source == botton1) then setTimer ( enableWater, 50,1) destroyElement(botton1) destroyElement(waterImage) elseif (source == botton2) then setTimer ( enableVehicle, 50,1) destroyElement(botton2) destroyElement(vehicleImage) elseif (source == botton3) then destroyElement(bigWindow) showCursor(false) end end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) function onGuiMouse (button, state, absoluteX, absoluteY) if (source == botton1) then waterImage = guiCreateStaticImage(11,22,310,219,"img/EnableWater.png",false,bigWindow) elseif (source == botton2) then vehicleImage = guiCreateStaticImage(11,22,310,219,"img/EnableVehicle.png",false,bigWindow) elseif (source == botton3) then closeImage = guiCreateStaticImage(11,22,310,219,"img/CloseButton.png",false,bigWindow) end end addEventHandler ("onClientMouseEnter", getRootElement(), onGuiMouse) function onGuiLeave (button, state, absoluteX, absoluteY) if (source == botton1) then destroyElement (waterImage) elseif (source == botton2) then destroyElement (vehicleImage) elseif (source == botton3) then destroyElement (closeImage) end end addEventHandler ("onClientMouseLeave", getRootElement(), onGuiLeave) local rootElement = getRootElement() function enableWater() local myShader = dxCreateShader ( "effect/water.fx" ) local textureVol = dxCreateTexture ( "img/smallnoise3d.dds" ); local textureCube = dxCreateTexture ( "img/cube_env256.dds" ); dxSetShaderValue ( myShader, "microflakeNMapVol_Tex", textureVol ); dxSetShaderValue ( myShader, "showroomMapCube_Tex", textureCube ); engineApplyShaderToWorldTexture ( myShader, "waterclear256" ) setTimer( function() if myShader then local r,g,b,a = getWaterColor() dxSetShaderValue ( myShader, "gWaterColor", r/255, g/255, b/255, a/255 ); end end ,100,0 ) end function enableVehicle() local myShader = dxCreateShader ( "effect/car_paint.fx" ) local textureVol = dxCreateTexture ( "img/smallnoise3d.dds" ); local textureCube = dxCreateTexture ( "img/cube_env256.dds" ); dxSetShaderValue ( myShader, "microflakeNMapVol_Tex", textureVol ); dxSetShaderValue ( myShader, "showroomMapCube_Tex", textureCube ); engineApplyShaderToWorldTexture ( myShader, "vehiclegrunge256" ) end function creditHunterix () outputChatBox ( 'PRO|Shader Panel By PRO|Hunterix', source, 255, 89, 0, true) outputChatBox ( 'PRO|Race Server 24/7 1.1', source, 255, 89, 0, true) end addEventHandler ("onPlayerJoin", getRootElement(), creditHunterix) Link to comment
HunT Posted March 6, 2012 Share Posted March 6, 2012 Hello! St3reo allowed me to post the code. function box() showCursor(true) local sWidth, sHeight = guiGetScreenSize() local Width,Height = 330,250 local X = (sWidth/2) - (Width/2) local Y = (sHeight/2) - (Height/2) bigWindow = guiCreateWindow(X,Y,Width,Height,"",false) guiWindowSetMovable(bigWindow,false) guiWindowSetSizable(bigWindow,false) guiSetAlpha(bigWindow,0.-- s8) --> botton1 = guiCreateButton(48,70,232,45,"",false,bigWindow) guiSetAlpha(botton1,0) guiSetProperty(botton1,"AlwaysOnTop","true") botton2 = guiCreateButton(49,130,232,45,"",false,bigWindow) guiSetAlpha(botton2,0) guiSetProperty(botton2,"AlwaysOnTop","true") botton3 = guiCreateButton(143,210,46,20,"",false,bigWindow) guiSetAlpha(botton3,0) guiSetProperty(botton3,"AlwaysOnTop","true") imagePanel = guiCreateStaticImage(11,22,310,219,"img/ShaderPanel.png",false,bigWindow) guiMoveToBack (imagePanel , true) guiSetEnabled ( imagePanel, false ) guiSetAlpha(imagePanel,0.9) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()),box) function onGuiClick (button, state, absoluteX, absoluteY) if (source == botton1) then setTimer ( enableWater, 50,1) destroyElement(botton1) destroyElement(waterImage) elseif (source == botton2) then setTimer ( enableVehicle, 50,1) destroyElement(botton2) destroyElement(vehicleImage) elseif (source == botton3) then destroyElement(bigWindow) showCursor(false) end end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) function onGuiMouse (button, state, absoluteX, absoluteY) if (source == botton1) then waterImage = guiCreateStaticImage(11,22,310,219,"img/EnableWater.png",false,bigWindow) elseif (source == botton2) then vehicleImage = guiCreateStaticImage(11,22,310,219,"img/EnableVehicle.png",false,bigWindow) elseif (source == botton3) then closeImage = guiCreateStaticImage(11,22,310,219,"img/CloseButton.png",false,bigWindow) end end addEventHandler ("onClientMouseEnter", getRootElement(), onGuiMouse) function onGuiLeave (button, state, absoluteX, absoluteY) if (source == botton1) then destroyElement (waterImage) elseif (source == botton2) then destroyElement (vehicleImage) elseif (source == botton3) then destroyElement (closeImage) end end addEventHandler ("onClientMouseLeave", getRootElement(), onGuiLeave) local rootElement = getRootElement() function enableWater() local myShader = dxCreateShader ( "effect/water.fx" ) local textureVol = dxCreateTexture ( "img/smallnoise3d.dds" ); local textureCube = dxCreateTexture ( "img/cube_env256.dds" ); dxSetShaderValue ( myShader, "microflakeNMapVol_Tex", textureVol ); dxSetShaderValue ( myShader, "showroomMapCube_Tex", textureCube ); engineApplyShaderToWorldTexture ( myShader, "waterclear256" ) setTimer( function() if myShader then local r,g,b,a = getWaterColor() dxSetShaderValue ( myShader, "gWaterColor", r/255, g/255, b/255, a/255 ); end end ,100,0 ) end function enableVehicle() local myShader = dxCreateShader ( "effect/car_paint.fx" ) local textureVol = dxCreateTexture ( "img/smallnoise3d.dds" ); local textureCube = dxCreateTexture ( "img/cube_env256.dds" ); dxSetShaderValue ( myShader, "microflakeNMapVol_Tex", textureVol ); dxSetShaderValue ( myShader, "showroomMapCube_Tex", textureCube ); engineApplyShaderToWorldTexture ( myShader, "vehiclegrunge256" ) end function creditHunterix () outputChatBox ( 'PRO|Shader Panel By PRO|Hunterix', source, 255, 89, 0, true) outputChatBox ( 'PRO|Race Server 24/7 1.1', source, 255, 89, 0, true) end addEventHandler ("onPlayerJoin", getRootElement(), creditHunterix) Fine Link to comment
Absence2 Posted March 6, 2012 Author Share Posted March 6, 2012 Thank you very much , I appreciate it! 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