Silent Posted April 1, 2010 Share Posted April 1, 2010 Hi, I'm trying to hook the car model without using the other car ID. For that I'm going to hook Model name and Txd name ingame. But I don't know in which mem addresses that informations are stored (if it's stored at all). Maybe anyone know how to do this? I'm going to do thing like this: // This file was decompiled using sascm.ini published by GTAG (http://gtag.gtagaming.com/opcode-database.php) on 6.2.2010{$VERSION 3.1.0027}{$CLEO .cs}//-------------MAIN---------------0000: NOP // Without any mods ID 400 = Landstalker. 0A8C: write_memory REQUESTED_MEM_ADDRESS size ?? value ?? virtual_protect ?? Model.Load(400) // By vehicles.ide hook, ID 400 is now hooked model, not Landstalker.:NONAME_20wait 10 if Model.Available(400)else_jump @NONAME_20 [email protected] = Car.Create(400, 0.0, 0.0, 0.0) // Car with hooked model spawns.0A93: end_custom_thread I know I can just create new car with requested model, but this thing is needed for SA-MP. Link to comment Share on other sites More sharing options...
Deji Posted April 1, 2010 Share Posted April 1, 2010 Hmm... people insist on finding magical memory addresses for these things? I don't really know what you're asking, but it might help you to know that model/txd names are not used in code. They are turned into model numbers: #LANDSTAL -> 400 The .txd and .dff files would be landstal.dff and landstal.txd There is no such thing as a car id (from what I know). A car model number is used to load the vehicle, not an id. If you could explain what you want to happen, when you do _____ in game, that'd probably help me understand what you're asking. I doubt there's an address that has some sort of text-to-model number conversion. Maybe there is, but I trust it would be very hard to find. Plus, it would probably a function address, not a memory address Link to comment Share on other sites More sharing options...
NTAuthority Posted April 2, 2010 Share Posted April 2, 2010 It appears you're trying to use this to cheat SA-MP, and I don't think that's allowed in here. They protect default.dat/vehicles.ide for a good reason. If you want to change the spawned vehicle, do so in the server's gamemode code. Inactive in GTA/R* title modification indefinitely pursuant to a court order obtained by TTWO. Good job acting against modding! Link to comment Share on other sites More sharing options...
Silent Posted April 2, 2010 Author Share Posted April 2, 2010 I don't want to cheat SA-MP in illegal way - I'm going to replace only car model to unique one, for Role Play server. Without editing handling or something other. Link to comment Share on other sites More sharing options...
Deji Posted April 2, 2010 Share Posted April 2, 2010 Well that counts as cheating. Different model = different physics on the car.. Which can mean more of an advantage for you. If you really need to switch models, do it via the gta3.img.. Rename the two cars you wanna switch to each others names. Doing this with code would result in crashes 99.9% of the time Link to comment Share on other sites More sharing options...
Recommended Posts