Collection of gta scripting and map weirdness

Anything to do with GTA1/GTA2 modding (tools, scripts and more).
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: Collection of gta scripting and map weirdness

Post by T.M. »

B-$hep wrote:Is it just me or this really makes miss2 crash because of the "CHECK_MULTIPLIER_GREATER" ??

[mis]player_ped p1 = ( 44.5 , 102.0 , 2.0 ) 25 0
LEVELSTART
CHECK_MULTIPLIER_GREATER ( p1 , 7 )
LEVELEND[/mis]
Sektor wrote:Yes that crashes the official compiler but I think T.M. found that it works in game if you write it to the SCR file: http://gtamp.com/forum/viewtopic.php?p=5166#p5166 (2011, time flies).

It certainly counts as scripting weirdness.
Oh yeah, we really need a common paper with all the knowledge... its too widespread. Im surprised Sektor even remembered that bug!
User avatar
Sektor
Boss
Boss
Posts: 1426
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: Collection of gta scripting and map weirdness

Post by Sektor »

I had to search the forum for that command to find the post but it did seem familiar. Thanks for volunteering to clean up all the GTA2 documentation :twisted:
User avatar
B-$hep
Immortal
Posts: 571
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: Collection of gta scripting and map weirdness

Post by B-$hep »

I noticed in hex editor that miss2 puts silently "END" string into .scr file. After declaration like this:
[mis]OBJ_DATA rocket1 = (88.0, 110.0) 0 COLLECT_02 15[/mis]


Did you knew?

Docs say that its used only for ex:
[mis]name = CREATE_OBJ ( float X , float Y ) rotation model END[/mis]

NEW CHANGE: certain commands must have an ‘end’ at the end of the line.

Another undocumented stuff?
Always wear safety glasses while programming.
User avatar
valps
Mugger
Mugger
Posts: 15
Joined: 31 Dec 2020, 15:03
GH nick: Valps
Location: Brazil
Contact:

Re: Collection of gta scripting and map weirdness

Post by valps »

Adding a player (e.g. p1) to a gang with

ADD_CHAR_TO_GANG (p1, any_gang)

causes him to lose control of his char if taken out of his car by another char (cop or another player), and to attack this char until he dies. Meanwhile, you be able only to jump or change your weapon.

It's funny because this bug allow you (actually your possessed char) to kill people by punching, which is normally impossible. And it happens in multiplayer as well!
User avatar
valps
Mugger
Mugger
Posts: 15
Joined: 31 Dec 2020, 15:03
GH nick: Valps
Location: Brazil
Contact:

Re: Collection of gta scripting and map weirdness

Post by valps »

Turning quickly on & off the 6 wanted level causes the game to keep spawning the army on the streets, although wanted level being below 6.

We can do this placing these commands immediately after the LEVELSTART, before any WHILE loop:

Code: Select all

ALTER_WANTED_LEVEL (p1, 6)
DO_NOWT
ALTER_WANTED_LEVEL (p1, 1)
It works even on multiplayer until a player get busted. Even if wanted level increases, the army still spawn.

I tried to find the memory address related to the army spawn, but I didn't get it. It would be fun to create some kind of martial law.
Example
Example
martial_law.jpg (96.37 KiB) Viewed 18215 times
Post Reply