Jump to content

XaskeL

Members
  • Content Count

    233
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by XaskeL

  1. I remember carefully studying your works. Unfortunately, the site was destroyed by time, but thanks to those people that with the help of the wayback machine they were able to return what was lost. I still keep many of your works on my HDD! Many of them are still useful today, even bone_attach was useful to the community until recently. I am grateful to you for that.
  2. try this without detachElements and setCameraMatrix setCameraTarget( localPlayer )
  3. attachElements( getCamera(), getPedOccupiedVehicle( localPlayer ), 0, -5, 1.5, -10, 0, 0 ); I think this is the result you want.
  4. local SHADER_CODE = [===[ float3 g_f3Color = (float3)0.0; struct PSInput { float4 Position : POSITION0; float2 TexCoord : TEXCOORD0; }; float4 PixelShaderFunction ( PSInput PS ) : COLOR0 { return float4( g_f3Color, 1.0 - PS.TexCoord.x ); }; technique { pass P0 { PixelShader = compile ps_2_a PixelShaderFunction(); } } ]===]; local _dxDrawRectangle = dxDrawRectangle; local g_pShader = dxCreateShader( SHADER_CODE ); function dxDrawRectangle( fX, fY, fWidth, fHeight, pColor, bPostGUI, bLerpAlpha ) if ( not bLerpAlpha ) then _dxDrawRectangle( fX, fY, fWidth, fHeig
  5. As soon as I get free from work, I will give a ready-made code.
  6. Try creating something like this in a shader (it's really easy) or make a similar background in Photoshop.
  7. I was able to get a quick acceleration of the helicopter to 180 km / h, and it seems to me that if the acceleration is increased strongly, it will damage the controllability and it will be necessary to make compensators for the rotational speed along the axes. https://wiki.multitheftauto.com/wiki/SetElementAngularVelocity
  8. -- Author: XaskeL -- Created 06/05/2021 -- https://forum.mtasa.com/topic/130202-question-dx-render-target-rounded-corners/ local SHADER_CODE = base64Decode( "AQn//gABAAAAAAAAAwAAAAEAAAAwAAAAAAAAAAAAAAAEAAAAAQAAAAAAgD8AAIA/AACAPwAAgD8GAAAAY29sb3IArAADAAAAAAAAAFwAAAAAAAAAAAAAAAEAAAABAAAAUrgePgcAAAByYWRpdXMAAAMAAAAAAAAAiAAAAAAAAAAAAAAAAQAAAAEAAAAK16M7CwAAAGJvcmRlclNvZnQAAAEAAAAAAAAAuAAAAAAAAAAAAAAAAQAAAAEAAAABAAAAEQAAAGNvbG9yT3ZlcndyaXR0ZW4AAAAAAQAAAA8AAAAEAAAAAAAAAAAAAAAAAAAAAwAAAFAwAAAMAAAAcm5kUmVjdFRlY2gABAAAAAEAAAACAAAAAgAAAAQAAAAgAAAAAAAAAAAAAAA8AAAAWAAAAAAAAAAAAAAAaAAAAIQAAAAAAAAAAAAAAJgA
  9. Why not try giving some kind of speed boost with vehicle.velocity? Write to resource manifest: <oop>true</oop> -- Author: XaskeL -- Created 05/05/2021 -- https://forum.mtasa.com/topic/130200-speed-of-helicopters local CAircraftSpeed = { addEventHandler = addEventHandler; setTimer = setTimer; localPlayer = localPlayer; tostring = tostring; g_iInterval = 50; g_fMultVelocity = 0.44; g_fVelocityLimit = 200; _DEBUG = true; }; CAircraftSpeed.__index = CAircraftSpeed; setmetatable( CAircraftSpeed, { __index = _G; } ); setfenv( 1, CAircraftSpeed ); if
  10. -- Author: XaskeL -- Created 04/05/2021 -- https://forum.mtasa.com/topic/130216-help-debug-settings-graphics local CGraphicsDebug = { addEventHandler = addEventHandler; dxDrawRectangle = dxDrawRectangle; dxDrawText = dxDrawText; setTimer = setTimer; engineGetVisibleTextureNames = engineGetVisibleTextureNames; localPlayer = localPlayer; guiGetScreenSize = guiGetScreenSize; resourceRoot = resourceRoot; root = root; g_bRenderInfo = false; g_iInterval = 2000; g_bOverlayDraw = true; BLACK = tocolor( 0, 0, 0, 255 ); WHITE
  11. local scx, scy = guiGetScreenSize( ); addEventHandler( "onClientRender", root, function ( ) if ( #engineGetVisibleTextureNames( ) < 1 ) then dxDrawRectangle( 0, 0, scx, scy, tocolor( 0, 0, 0, 255 ), false ); end end ); in theory this should work
  12. texture texture0; float factor; sampler Sampler0 = sampler_state { Texture = (texture0); AddressU = MIRROR; AddressV = MIRROR; }; struct PSInput { float2 TexCoord : TEXCOORD0; }; float4 PixelShader_Background(PSInput PS) : COLOR0 { float4 sum = tex2D(Sampler0, PS.TexCoord); for (float i = 1; i < 3; i++) { sum += tex2D(Sampler0, float2(PS.TexCoord.x, PS.TexCoord.y + (i * factor))); sum += tex2D(Sampler0, float2(PS.TexCoord.x, PS.TexCoord.y - (i * factor))); sum += tex2D(Sampler0, float2(PS.TexCoord.x - (i * factor), PS.TexCoord.y)); sum += tex2D(Sampler0, float2(PS.TexC
  13. You must remove all references to the buffer variable and call "collectgarbage ()" after replacing the model, thereby freeing memory from unused data in the variables
  14. I want put out it on github. If you add server events and some functions for exports, then we can give people a good enough bone_attach
  15. I caught trend and I'm working on optimize bone_attach. 1000 objects in stream:
  16. XaskeL

    [HELP] SHADER

    https://community.multitheftauto.com/?p=resources&s=details&id=16502
  17. https://en.wikipedia.org/wiki/Anisotropic_filtering
  18. Link for download working example (Click Here)
  19. -- example [1]: CGlitch:show(500); -- example [2]: CGlitch.show(CGlitch, 500); -- params: @self (table CGlitch), 500 (time in milliseconds or false for permanently drawing) show = function(self, fTime) -- create screen source & shader if not self.Shader then self.MyScreenSource = dxCreateScreenSource(CGlitch.ScreenSize[1], CGlitch.ScreenSize[2]); self.Shader = dxCreateShader(SHADER_CODE); -- set default parametres dxSetShaderValue(self.Shader, 'GlitchPower', self.GlitchPower); dxSetShaderValue(self.Shader, 'myScreenSource', self.MyScreenSource); end -- set work t
  20. I writted shader for you. Code for client.Lua: local SHADER_CODE = base64Decode("AQn//sQCAAAAAAAABQAAAAQAAAAcAAAAAAAAAAAAAAABAAAADwAAAG15U2NyZWVuU291cmNlAAADAAAAAAAAAFAAAABcAAAAAAAAAAEAAAABAAAAAAAAAAYAAABnVGltZQAAAAUAAABUSU1FAAAAAAMAAAACAAAAxAAAAOAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFQAAAGdXb3JsZFZpZXdQcm9qZWN0aW9uAAAAABQAAABXT1JMRFZJRVdQUk9KRUNUSU9OAAoAAAAEAAAAKAIAAAAAAAAAAAAAAgAAAAUAAAAEAAAAAAAAAAAAAAAAAAAAAwAAAAIAAAACAAAAAAAAAAAAAAAAAAAAAQAAAAEAAAADAAAAAgAAAAIAAAAAAAAAAAAAAAAAAAABAAAAAQAAAAIAAAACAAAAAgAAAAAAAAAAAA
  21. set script type "shared" in xml. example: <meta> <script src="table.Lua" type="shared" cache="false"/> </meta>
×
×
  • Create New...