GTAMP.com

Grand Theft Auto Media Press
It is currently Mon Jul 23, 2018 5:21 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Spawning Cars
PostPosted: Fri Jul 14, 2017 10:16 pm 
Offline
Car Jacker

Joined: Fri Oct 14, 2016 1:32 am
Posts: 41
Is there a way to spawn cars on command? Can you only do it by script?


Top
 Profile  
 
 Post subject: Re: Spawning Cars
PostPosted: Sat Jul 15, 2017 1:17 am 
Offline
Boss
User avatar

Joined: Tue Mar 04, 2008 6:51 am
Posts: 1332
Location: GTAMP.com
I don't know how to spawn anything without using script but it would be useful. You need to find out how to execute existing gta2.exe functions from your own process/DLL.


Top
 Profile  
 
 Post subject: Re: Spawning Cars
PostPosted: Sun Jan 14, 2018 1:03 pm 
Offline
Hitman

Joined: Wed Dec 09, 2015 2:18 pm
Posts: 165
It would be useful to know this. I also asked myself this question

_________________
Map F-Industry-Live
MISI Library

Telegram channel @NonameGames
Twitter channel @TheNonameGames


Top
 Profile  
 
 Post subject: Re: Spawning Cars
PostPosted: Wed Feb 21, 2018 1:06 pm 
Offline
Boss
User avatar

Joined: Tue Mar 04, 2008 6:51 am
Posts: 1332
Location: GTAMP.com
GTA2 loads the SCR file into memory, so you can edit that part of the memory and change the script commands while it's running. I would prefer a direct way of executing existing commands but I don't know how to do that yet.

The SCR file is stored around here:

GTA2.EXE+0x2744BC, offset 35C

I tried simple one byte changes like changing the model of car that was constantly being created with a custom script and that worked, so you could try changing an entire hex SCR command to a SCR hex create_car command. You'll have to read up on the GTA2 SCR file format, look at the decompiler.dll sources or ask the SCR experts.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group