Dzsozi

Members
  • Content count

    466
  • Joined

  • Last visited

Community Reputation

22 Decent

2 Followers

About Dzsozi

Details

  • Location
    Hungary

Recent Profile Visitors

841 profile views
  1. Hello! This is my first time working with shaders and I bumped into a problem. I would like to define two textures in one shader file, so I need less coding in lua and don't have to create the shader two times. I want to make a back-up light system for vehicles and I want to reach that by changing the vehiclelights128 and vehiclelightson128 textures. Since these are two different textures, I must replace them both when backing up with a car, since I can't detect if the lights are on or off if the setVehicleOverrideLights is set to 0 (default, changing automatically). That's why I would like to create something like onTexture and offTexture inside the shader file, but I don't know how can I do that, since I have never worked with shaders before. I tried something like this, but this doesn't work: Shader file: texture onTexture; texture offTexture; technique hello { pass P0 { Texture[0] = onTexture; Texture[1] = offTexture; } } I don't know how I should do this. And the lua file (only a part of it, the backing mechanism and everything works): if not shaderReverse and seat == 0 then shaderReverse = dxCreateShader ( "files/texture.fx" ) textureReverse = dxCreateTexture ( "files/images/vehiclelightsreverse128.png", "dxt5" ) textureReverseOn = dxCreateTexture ( "files/images/vehiclelightsonreverse128.png", "dxt5" ) end if shaderReverse then engineRemoveShaderFromWorldTexture ( shaderReverse, "vehiclelights128", vehicle ) engineRemoveShaderFromWorldTexture ( shaderReverse, "vehiclelightson128", vehicle ) end if engine then if getControlState("brake_reverse") and gear == 0 and getVehicleSpeed(vehicle) > 0 then dxSetShaderValue ( shaderReverse, "onTexture", textureReverseOn ) engineApplyShaderToWorldTexture ( shaderReverse, "vehiclelightson128", vehicle ) dxSetShaderValue ( shaderReverse, "offTexture", textureReverse ) engineApplyShaderToWorldTexture ( shaderReverse, "vehiclelights128", vehicle ) end end So what doesn't work: the textures get replaced immediately on resource start, it worked when I did it with one texture in the shader file, but then I couldn't change the vehiclelightson128 texture, that's why I want to "define" two textures in the shader file. Hope you understand me. Thank you for your help in advance!
  2. Alright, awesome, feel free to post suggestions, I would be happy if I could read them!
  3. That will be an addition as well, these are all basic stuff that the system will contain by default, expect more complex stuff than these.
  4. Of course, that's basic stuff, I wanted to do advanced lights, indicators and etc. My answer for the smoke stuff: I think it looks more realistic, also, I would like to represent the exhaust pipe and the stuff around it at the bottom of a car being damaged. v0.2 almost done, since I posted the video I have made lots of changes. I think today I will be able to post about v0.2.
  5. Just added the video I was talking about, preview of v0.1.
  6. Hello! I started working on a vehicle realism system project, and I would like to introduce it to you. What does the system (will) contain? Currently has: - Custom sounds for vehicles - Custom damage "handling" (scroll down a little bit to see what I mean by that) - Players can't push the vehicles with "bare hands", by just running into them, vehicles will stay in one place, but you can push a car with another car or other vehicle I just started working on this, it is in alpha state, so right now it has a lot of bugs, but not so much that I can't make a video about it, so video coming soon (I already recorded it, I just have to edit, render and upload it)! Will feature: - Panels on vehicles (mostly cars) won't break if you collide with something if you are not going so fast, kind of a bug fix, since GTA SA handles these door and etc. breakings really bad, but if you go with high speed the damage will be applied - Probably a little bit complex (at least more complex than current ones) fuel and some other engine systems - Interaction with vehicles, like opening doors from outside, etc. - More realistic handlings - Realistic ramming system, for example if you hit an other player at high speed, your car won't fly up in the air, making the other player just fall down in front of the vehicle and losing a little bit of health - another example: if you collide with a breakable fence, bollard, lamp or something at high speed, it will break more easily, depending on the object you collided with - Engine failure system - breakdowns - Some basic stuff for cars, like travel meter, indicators and etc. - Custom events and functions, like onVehicleRepair, etc. - Custom siren sounds and sirens, flashers for emergency and other vehicles with sirens - Vehicles will get dirty depending on the surface you drive it on, for example, gets dirty on: mud, grass, sand etc. surfaces, and nothing will happen if you drive on surfaces like: concrete, road, etc. Therefore you will have to get your car to a carwash. That's it for now, I can't remember anything else I wanted to do, if something comes into my mind I will just put it in the "Will feature" section. So what do I mean by custom damage handling? You will see it in the video, but for a short explanation: Right now every vehicle's health will only go down to 650 HP, not below, from there, if you collide with something and the vehicle lost more HP than 75 HP, your vehicle will start releasing smoke from the rear tyres. From now on, your vehicle has an element data, which means that your vehicle is overheating and damaged, that's why there is smoke coming out from it, but not in the regular way. You can damage your vehicle however you want, it won't blow up until it loses 150 or more HP. If your vehicle loses 150 (or more) HP, it will be set on fire at the same spot, next to the rear tyres, just like in GTA IV, however, you can still drive it. From this moment, you have 10 seconds to leave your vehicle and run away, after 10 seconds it will blow up. Of course, you will be able to fix and remove the smoke leaking from the vehicle, but you won't be able to "cancel" the blowing up process by fixing the vehicle. So this is what I mean by "custom damage handling", it is a little bit harder to blow up a vehicle, it's like it has more health, since you can damage it with hands and weapons that doesn't remove more HP than 150 at once. As I already wrote, video will be coming soon! P.S.: Sorry for the (grammar) mistakes in sentences, if I made any, I'm not perfect at English. v0.1 - Custom sounds for vehicles - Custom damage "handling" (scroll down a little bit to see what I mean by that) - Players can't push the vehicles with "bare hands", by just running into them, vehicles will stay in one place, but you can push a car with another car or other vehicle Video:
  7. No, I don't have it.
  8. Okay, cool, thank you!
  9. Thank you! / Köszönöm!
  10. Hello! First of all, my question is if it is possibble to make a color gradiented instead of a solid colored dx element, mainly a dx rectangle. If so, how I could achieve that? Like this: Thank you for your answer in advance!
  11. Hello! Sorry for posting here, I don't know which would be the correct forum for this question, maybe none, but I need help asap, and I thought that this would be the fastest way where I could get help. And since I need it for scripting, it is not really off topic. My question is if anybody knows which font is it? I mean the "+100" and the "One shot One kill" texts, does anybody know which font is it? I would need it really bad and I can't find it. It is not the bankgothic, the letters and numbers doesn't look the same. Thanks for your help in advance!
  12. @Zango I like your second idea better, but I also like parts of the first one. I will try to mix these two, my idea is to create a timer after a certain distance, and then burst the tyres, the timer would have a random time generated by the script if the driver goes above the given distance, and then reset the distance counter after the tyre was burst, so the whole thing starts from the beginning with a newly generated timer with a random time. Thanks! One more question, which is better in your opinion? - to use the setTimer function - to use onClientRender and getTickCount? Right now I find the second one easier and better, but I don't know, I really want to prevent lags and fps drops.
  13. Hello! I would like to create a script in which your vehicle's tyre would burst randomly, so I can do things like you will have to change tyres, etc. but I don't know what would be the most efficient way to do this, since I will have to do it server side to sync it, I don't think setTimer is a good choice, therefore there would be lots of timers which is not really good I guess. Or is it okay to use timers? If so, how should I use them, when to create and kill them, etc. Any suggestions or help in connection with that? Has anybody made something similar like this?
  14. I know it doesn't remove the lights, but this is one useful resource if you want darker nights without shaders. http://community.multitheftauto.com/index.php?p=resources&s=details&id=9333 I think you should at least try it and see if you like it.
  15. You can try using https://wiki.multitheftauto.com/wiki/CreateAnimation function. I didn't test it or tried it out but it might work.