Dzsozi (h03)

  • Content count

  • Joined

  • Last visited

  • Days Won


Dzsozi (h03) last won the day on December 25 2017

Dzsozi (h03) had the most liked content!

Community Reputation

50 Popular


About Dzsozi (h03)

  • Rank
    Playa Partner


  • Location

Recent Profile Visitors

2,330 profile views
  1. Custom Client

    First I was thinking about a custom launcher as well, and I wanted to do that but I don't know how. But what do you mean by it is useless? Can I do everything without making a custom launcher or anything, just by modifying MTA settings or what? Could you explain it a little bit better?
  2. Custom Client

    Oh, alright, sorry I didn't know that. Could a moderator move this topic to the correct section?
  3. Element silhouette outline shader

    Thank you for your reply, but this is still not the effect I would like to reach. There's the cartoon shader, it has an outline shader that is being applied for everything, I just need to know how can I get this outline and apply it to an element I choose.
  4. Custom Client

  5. Custom Client

    Hi! I would like to do a custom MTA client. Here's the reason why I was thinking about it: I would like to change the map from SA to a different one, I know it is possibble with scripting, but I would like to go a little bit deeper and replace it in the "engine" if you know what I mean. I was thinking about replacing the gta3.img files and other ipl and xml and such files with the default ones, but I don't know how I should start doing it. I never did something like this. How I could achieve that MTA would load a different gta3.img for example, with the modded objects and vehicles and such, so whenever I start my custom client, I could only join to my own server and it wouldn't download and load the custom map, since the downloaded custom client already has the files by default and it loads it first, instead of the SA map. I would really appreciate if somebody could help me out which way I should start looking forward to do it or how to do it. I know that the SA:MP client requires you to choose the default GTA SA folder, and it also puts some stuff in there, maybe an img file if I remember correctly, since SAMP uses some custom objects. Also, that way (with the custom client/launcher) it may be possibble to add extra models/objects to the game in MTA? It would be nice if someone more experienced scripter or programmer could provide some information in connection with this. EDIT: I am also interested if using custom img and definition files for coordinates is more PC and FPS friendly than just using simple lua scripts in MTA SA to replace objects.
  6. Element silhouette outline shader

    I wouldn't have opened a topic here if I could do it by myself. That doesn't help me out much.
  7. Element silhouette outline shader

    This is not an outline, just scaled up textures which is not the same. I already tested it.
  8. Element silhouette outline shader

    I know about this resource and I get it, but | | V And I guess I would have to edit the .fx file, but I don't know what to do, edit where and what? I have no idea.
  9. Element silhouette outline shader

    Hello! I would like to make a shader which creates an outline for an element I choose to. Similar to this effect on the image (look at the right bottom corner and the desk, you can see a blue and a yellow outline for the objects): One more example: I have a .fx file and a few lines of code, but I am not sure what should I do with the shader file, I just started learning HLSL language and I almost know nothing about it. I found this shader on a tutorial website for HLSL, here: and I just copied the parts that I think I need, the outline part of the shader. But my script doesn't seem to work, I don't know what could be the problem and how to solve it, and also, debugscript 3 doesn't output any errors. It would be awesome if somebody could help me out with this one. Here's my current client side script: local outlineShader function createElementOutline(element, thickness, r,g,b,a) if element and isElement(element) then for _,name in ipairs(engineGetModelTextureNames(tostring(getElementModel(element)))) do dxSetShaderValue(outlineShader, "Texture", name) engineApplyShaderToWorldTexture(outlineShader, name, element) end dxSetShaderValue(outlineShader, "LineThickness", thickness) dxSetShaderValue(outlineShader, "LineColor", r/255, g/255, b/255, a/255) end end addEventHandler("onClientResourceStart", resourceRoot, function() if getVersion().sortable < "1.5" then outputChatBox("Resource is not compatible with this client.") return else outlineShader = dxCreateShader("shaders/outline.fx") createElementOutline(localPlayer, 1, 255,255,255,255) if (not outlineShader) then outputChatBox("Could not create Outline shader. Please use debugscript 3.") end end end) And the shader file: // The world transformation float4x4 World; // The view transformation float4x4 View; // The projection transformation float4x4 Projection; // The transpose of the inverse of the world transformation, // used for transforming the vertex's normal float4x4 WorldInverseTranspose; // The color to draw the lines in. Black is a good default. float4 LineColor = float4(0, 0, 0, 1); // The thickness of the lines. This may need to change, depending on the scale of // the objects you are drawing. float LineThickness = .03; // The texture being used for the object texture Texture; // The texture sampler, which will get the texture color sampler2D textureSampler = sampler_state { Texture = (Texture); MinFilter = Linear; MagFilter = Linear; AddressU = Clamp; AddressV = Clamp; }; struct AppToVertex { float4 Position : POSITION0; // The position of the vertex float3 Normal : NORMAL0; // The vertex's normal float2 TextureCoordinate : TEXCOORD0; // The texture coordinate of the vertex }; // The structure used to store information between the vertex shader and the // pixel shader struct VertexToPixel { float4 Position : POSITION0; float2 TextureCoordinate : TEXCOORD0; float3 Normal : TEXCOORD1; }; // The vertex shader that does the outlines VertexToPixel OutlineVertexShader(AppToVertex input) { VertexToPixel output = (VertexToPixel)0; // Calculate where the vertex ought to be. This line is equivalent // to the transformations in the CelVertexShader. float4 original = mul(mul(mul(input.Position, World), View), Projection); // Calculates the normal of the vertex like it ought to be. float4 normal = mul(mul(mul(input.Normal, World), View), Projection); // Take the correct "original" location and translate the vertex a little // bit in the direction of the normal to draw a slightly expanded object. // Later, we will draw over most of this with the right color, except the expanded // part, which will leave the outline that we want. output.Position = original + (mul(LineThickness, normal)); return output; } // The pixel shader for the outline. It is pretty simple: draw everything with the // correct line color. float4 OutlinePixelShader(VertexToPixel input) : COLOR0 { return LineColor; } // The entire technique for doing toon shading technique Toon { // The first pass will go through and draw the back-facing triangles with the outline shader, // which will draw a slightly larger version of the model with the outline color. Later, the // model will get drawn normally, and draw over the top most of this, leaving only an outline. pass Pass1 { VertexShader = compile vs_2_0 OutlineVertexShader(); PixelShader = compile ps_2_0 OutlinePixelShader(); CullMode = CW; } } I guess I will need to use mta-helper.fx to get some positions, maybe the camera position, I am not sure, I don't really understand yet how shaders work. Thank you for your reply in advance!
  10. Face toward at dxDrawMaterialLine3D depending on rotations

    I have been trying to change the values, but these doesn't seem to work, well I can't make them functioning the way I would like to. But I have one more idea, I don't know if it is possibble, but is there any way to get the surface rotation or anything like this? I'm thinking about the default headlight shadow's functionality, is there any way to recreate the way it is working?
  11. Hello! I really need some math experts' help, I can't figure out what should I do. I am using the dxDrawMaterialLine3D function to draw light shadows on the ground, and these are attached to a vehicle. My only problem is that I don't know how should I make the light always face up, even when the vehicle is rotated and keep the rotation, so I won't experience problems like this: So as you can see, when I'm not on an even surface, the "light" goes through the ground, that's why I would like to make the image face upwards depending on the vehicle's rotation, or at least adjust it and not make it face always up. I hope you understand what I am trying to do. Here's what it should look like (it is on an even surface): So, I don't really know how should I calculate these numbers to make it work with the faceTowardX, faceTowardY and faceTowardZ parameters. Could somebody help me out with the calculations? local x, y, z = getElementPosition(matching.element) local rx, ry, rz = getElementRotation(matching.element) local faceX, faceY, faceZ = --?, ?, ? dxDrawMaterialLine3D(worldX, worldY-1, fixedGroundPosition, worldX, worldY+1, fixedGroundPosition, data.renderTarget, 2, tocolor(lightColor[1],lightColor[2],lightColor[3],lightColor[4]), faceX, faceY, faceZ) Thank you for your reply in advance!
  12. Texture layers

    Hello! I have a simple question for people experienced with shaders. This might not be hard to do, but I am no expert when it comes to shaders. I would like to make a shader which allows me to add a texture on top of an existing texture. For example, let's say I want to make CJ's clothes dirty without replacing the actual clothing texture, but instead I could apply the shader on the player_torso (I guess), and if it is possibble, I could create a new texture which could be placed on the player_torso texture, but not replacing it, just adding the custom texture on top. I hope you understand me. So the question is, how can I make something like this possibble? If it's not a big favor, could somebody help me out with writing the fx shader file? I have 0 HLSL knowledge, so that would be really helpful. Thank you for your reply in advance!
  13. [SHOW] Vehicles Get Dirty

    Yes I agree and I was also thinking about it.
  14. Fall off bike fix This may help you out with the rotations.