Jump to content


  • Posts

  • Joined

  • Last visited


  • Gang
    Addicted Scripters

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

DEFCON1's Achievements


Snitch (10/54)



  1. Take a look at this post, I think it's exactly what you need. https://forum.multitheftauto.com/viewtop ... 86#p312307
  2. It was discussed that GTA units are meters and that a multiplier of 160.9 make no sense, at all. The most accurate formula is, based on how much meters are travelled in one second: For KM/H: math.sqrt( (velX * velX) + (velY * velY) + (velZ * velZ) ) * 184 For MP/H: math.sqrt( (velX * velX) + (velY * velY) + (velZ * velZ) ) * 114.33 (Using sqrt is more efficient than using exponents) And about your question, you could do like that: local unitsString = "km/h" local speedMultiplier = 184 function getspeed() return math.sqrt( (velX * velX) + (velY * velY) + (velZ * velZ) ) * speedMultiplier end function toggleUnits() if unitsString == "km/h" then unitsString = "mph" speedMultiplier = 114.33 else unitsString = "km/h" speedMultiplier = 184 end end addCommandHandler( "ToggleSpeedoUnits", toggleUnits ) function drawspeed() dxDrawText( tostring( math.floor( getspeed() ) ), 911.0, 654.0, 982.0, 685.0, tocolor(255,255,255,255), 1.0, "bankgothic", "right", "left", false, false, false) dxDrawText( unitsString, 989.0, 664.0, 1019.0, 680.0, tocolor(255,255,255,255), 1.0, "default", "top", "left", false, false, false) end addEventHandler("onClientRender", getRootElement(), drawspeed) For showing or hiding speedometer, same principle as toggleUnits but use add/RemoveEventHandler("onClientRender", .... ). You could make it more advanced and beautiful by making it fade in/out when you enter/leave vehicles.
  3. Yes I agree. Some times ago I've worked on this feature but I lost all my work so... yeah, may I will try again. I remember I was stuck to adding language files in the installer and how to set the default language from the installer itself, rather than installing in english and then selecting manually the language in MTA. Then a lua function such as getPlayerLanguage( player ) will be useful, so people can start making multilingual resources easily.
  4. Why not compiling the server as well ? Just build the whole solution and it should work
  5. Bah, to be honest, when I did that it was in sa-mp, with a custom streamer... now I've just tested to convert it for use in mta and it looks like total crap x) Well, not that bad but the max draw distance isn't enough on this case. And also it crashed my game while I was flying around with an hydra (I don't think mta's streamer was made to handle 40000+ objects lol) Let's say it's not suitable for the whole map, but for a small area as he want, it might work well.
  6. Problem solved, thanks to Flobu! For people who may have the same problem: open .../MTA10_Server/version.h, and change VERSION_TYPE_RELEASE to VERSION_TYPE_CUSTOM.
  7. I suggest you look here: http://www.game-monitor.com/search.php? ... cation=500 You can list servers by how far they are located, this should help you
  8. That's it probably. I tried in my custom build, I set it to 1 every frame and I don't die.
  9. Having clientside config files? There is no point to do this, your MTA client does have those coordinates stored in memory. I suppose the server send them only once or, only when it need to be updated. And your client check if you entered a pickup, but it still need to send some data to let the server know that you picked up something. I use someone's wifi (max 100kb/s), but I don't have that much lag in games... You must have a really crap connexion!
  10. Sorry I was wrong, I think the correct address is 0x00B7CDE0 which normal value is 1000.0, and as expected, a value of 0 is when you start losing health 'normally' (with a value of 30, you lose health only if you swim, but if you don't move, you don't lose health)
  11. Address is 0x00B7CDE2. Value when bar is full: 17530, not sure for when bar is empty, but around 16900.. I froze it in Cheat engine and the bar doesn't decrease when under water, and player can't die from drowning. Now searching address of how fast it decrease/increase (I found it earlier I think, but now I've lost it..)
  12. I start to get it It's like, "this sound effect need the same value than an existing one used to display a part of the hud, so let's use this existing value!", lol! So from what I understand, it is needed to create a new variable with a similar value, and tell gta_sa.exe to use this new value for our needs, instead of the default one that is used for something else. But I have really no idea how to do that, especially within an external program such as MTA. Is there any MTA function that use this method, so I could study that ? I let you do the MTA patch of course, you probably know much more than I do. In fact I don't even care about those misaligned texts (but MTA team probably does)... at least I've learned how to find some basic addresses lol Oh, also you should obviously test with the original HUD, as it looks like a scripted hud PS: I agree for your FOV fix, it is definately needed.
  13. I don't get it, NTAuthority. I think everything is fine with the actual FOV in MTA (when the Widescreen option is enabled). And more importantly: does YOUR fix make the vehicle name's text and zone name's text to the middle of the screen, as the original 4/3 display ? Or they move at the right side of the screen? Mine have this problem, and I don't think that it is fixable... Also I searched for addresses to move and resize individual parts of the hud,the only one I found which does not cause problems, is the health bar... I have found for the radar but this also affect the armor/breath bars so it's unusable. Something else I've found, it also affect the audio volume (wtf), or even vehicles's tire's width!... many problems like that lol
  14. Not really. As I also want to retrieve the mouse cursor position, even if that cursor isn't visible... But I think that's impossible, for now anyway. I just wanted to do a radial menu today, likein left 4 dead. It's actually very cool, only..well, you have to move the cursor to select the item.. I may release it soon since I can't finish it as I want.
  • Create New...