Jump to content

NPC Spawning prevention?


Recommended Posts

I am asking where in MTA source code i can find the part that prevents the client from spawning clientside NPCs. I am asking this because i want to remove that prevention. I want the client to spawn driving and walking NPCs, i dont care if the NPCs arent synced to other players because there will be only me and my friend playing in my private server. I hope someone will give me a proper answer. Thanks in advance.

Edited by Guest
Link to comment

Well, I found where the values for car and ped density multipliers are stored: 0x8A5B20 and 0x8D2530 respectively. Both are shared floats; the former is referenced by the opcode handler, obviously, as well as traffic functions, emergency vehicle spawning, and CMissionCleanup. The latter is also referenced by CMissionCleanup and during cutscenes. You can add a function to work with these addresses yourself, it shouldn't be awfully difficult - just don't modify them directly. Whether it'll actually work as intended in MTA just by changing those two memory addresses alone is another story. I tested these two addresses in GTA:SA single-player and they worked as desired (once you move outside of any currently spawned peds/vehicles, no more will spawn).

I'm also not a developer, so I have no idea if the above will work in MTA.

Link to comment

Thank you for the info :wink: . Now i got a problem with building the client. I did everything as instructed here: https://wiki.multitheftauto.com/wiki/Compiling_MTASA and when i try to open the client it gives me this error:

Multi Theft Auto has not been installed properly, please reinstall. [Registery key not present]. And should it always put the _d at every filename? According to wiki that stands for debug. I'm using Microsoft Visual Studio 2008 with SP1 on Windows 7

Link to comment
CLEO is not usable in MTA. Also, I'm fairly sure that the values for 01EB and 03DE are restricted to between 0.0 and 1.0.

I don't know anything about your compilation errors, but I'll try to have someone look at your post and see if they have any suggestions.

Is there any kind of program that allows CLEO in MTA?

Link to comment
CLEO is not usable in MTA. Also, I'm fairly sure that the values for 01EB and 03DE are restricted to between 0.0 and 1.0.

I don't know anything about your compilation errors, but I'll try to have someone look at your post and see if they have any suggestions.

Is there any kind of program that allows CLEO in MTA?

Nope. CLEO is an .asi file loaded by GTA at startup. MTA disallows such modifications for obvious reasons. CLEO mods have access to GTA's opcode handler and also adds certain opcodes, some of which deal with memory access.

Link to comment
  • 2 weeks later...
CLEO is not usable in MTA. Also, I'm fairly sure that the values for 01EB and 03DE are restricted to between 0.0 and 1.0.

I don't know anything about your compilation errors, but I'll try to have someone look at your post and see if they have any suggestions.

Have you found anything/anyone yet who could know more?

Link to comment
  • 2 weeks later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...