How can I change the vehicle data script settings?

Anything to do with GTA1/GTA2 modding (tools, scripts and more).
User avatar
Sektor
Boss
Boss
Posts: 1459
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: How can I change the vehicle data script settings?

Post by Sektor »

You need to create the player and the car. You also you need a LEVELEND.

Are you trying to give vehicle machine gun to all APCs or just a specific one?

This script will check every vehicle the player enters and if it's an APC then it will make it rocketproof and give it vehicle gun.

Code: Select all

// ste.gmp ste.sty apc.scr


PLAYER_PED p1 = (35.0, 212.0, 255.0) 25 0
PARKED_CAR_DATA specific_apc = (36.0, 212.0, 255.0) 0 0 APC

CAR_DATA any_apc
COUNTER loop = 1

LEVELSTART

WHILE ( loop = 1 )

STORE_CAR_CHARACTER_IS_IN (p1,any_apc)

IF (CHECK_CAR_MODEL (any_apc,APC))
 SET_CAR_FLAMEPROOF (any_apc, ON)
 SET_CAR_BULLETPROOF (any_apc, ON)
 SET_CAR_ROCKETPROOF (any_apc, ON)
 GIVE_WEAPON (any_apc, car_machine_gun)
ENDIF

ENDWHILE

LEVELEND
dltmdwns156
Car Jacker
Car Jacker
Posts: 21
Joined: 01 Jun 2025, 07:51

Re: How can I change the vehicle data script settings?

Post by dltmdwns156 »

I compiled it with the above in the "bil.mis" file and it was successful because the "bil.SCR" file was created. So I overwritten the "bil.SCR" file into the GTA2 data folder, but it didn't work on the game... Is there anything I missed?
User avatar
Sektor
Boss
Boss
Posts: 1459
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: How can I change the vehicle data script settings?

Post by Sektor »

are you running bil.scr? It's the 3rd area if choosing from singleplayer or you can launch it directly in gta2manager debug tab using skip frontend
dltmdwns156
Car Jacker
Car Jacker
Posts: 21
Joined: 01 Jun 2025, 07:51

Re: How can I change the vehicle data script settings?

Post by dltmdwns156 »

Image

If I check it like the picture above and run GTA2, it says "Unable to open file: ₩ style.style" and it doesn't work
User avatar
Sektor
Boss
Boss
Posts: 1459
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: How can I change the vehicle data script settings?

Post by Sektor »

You need to type in bil.gmp, bil.ste and bil.sty into 3 different places. I’ll let you figure out where.
dltmdwns156
Car Jacker
Car Jacker
Posts: 21
Joined: 01 Jun 2025, 07:51

Re: How can I change the vehicle data script settings?

Post by dltmdwns156 »

I tried it, but first of all, the script that was written and compiled in bil file was not applied to the game, but when I compiled it with my own file, it was applied. Is there anywhere I should write when I put a script in the bil.mis file? I wrote it at the bottom when I wrote it.
And I have more questions. When I saw it on the game, it was unlimited, but is there a script that limits the quantity and consumes it?

Image
User avatar
Sektor
Boss
Boss
Posts: 1459
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: How can I change the vehicle data script settings?

Post by Sektor »

I didn't know you were adding to the existing bil.mis

You can't just put it at the end, that code will never run because it's outside the existing WHILE ENDWHILE loop. You also shouldn't have more than one LEVELSTART and LEVELEND.

Before the existing LEVELSTART, put CAR_DATA any_apc

After the existing LEVELSTART, put:

STORE_CAR_CHARACTER_IS_IN (p1,any_apc)

IF (CHECK_CAR_MODEL (any_apc,APC))
SET_CAR_FLAMEPROOF (any_apc, ON)
SET_CAR_BULLETPROOF (any_apc, ON)
SET_CAR_ROCKETPROOF (any_apc, ON)
GIVE_WEAPON (any_apc, car_machine_gun)
ENDIF
dltmdwns156
Car Jacker
Car Jacker
Posts: 21
Joined: 01 Jun 2025, 07:51

Re: How can I change the vehicle data script settings?

Post by dltmdwns156 »

Image

I wrote it like the picture above, but it doesn't work in the game. Please review it
Post Reply