Weapons in GTA 2 Mission Scripts
A guard with no gun is pretty pointless, so the script below will allow you to give your characters, and even the player, weapons. You can only give characters one weapon, but they have infinite rounds, but you can give the player as many weapons as you like, but you can specify how much ammo you give him otherwise it will be default. This is also true for vehicles as well, such as the Tanks battle cannon or the Jeeps machine gun.
GENERATOR
Weapons
Generators are usually found by gang phones and spawn a weapon or other item after a set amount of time for ever until it is switched off by a command. They can only be of the types in the table below, which include the icon they create in-game.
Picture | Static Object | Moving Object | Game Name |
---|---|---|---|
![]() | COLLECT_00
| MOVING_COLLECT_00
| Pistol |
![]() | COLLECT_01
| MOVING_COLLECT_01
| S-Uzi Machine Gun |
![]() | COLLECT_02
| MOVING_COLLECT_02
| Rocket Launcher |
![]() | COLLECT_03
| MOVING_COLLECT_03
| Electro Gun |
![]() | COLLECT_04
| MOVING_COLLECT_04
| Molotov Cocktail |
![]() | COLLECT_05
| MOVING_COLLECT_05
| Grenade |
![]() | COLLECT_06
| MOVING_COLLECT_06
| Shotgun |
![]() | COLLECT_08
| MOVING_COLLECT_08
| Flamethrower |
![]() | COLLECT_09
| MOVING_COLLECT_09
| Silenced S-Uzi Machine Gun |
![]() | COLLECT_10
| MOVING_COLLECT_10
| Dual Pistol |
![]() | COLLECT_15
| MOVING_COLLECT_15
| Vehicle Bomb |
![]() | COLLECT_16
| MOVING_COLLECT_16
| Vehicle Oil |
![]() | COLLECT_17
| MOVING_COLLECT_17
| Vehicle Mine |
![]() | COLLECT_18
| MOVING_COLLECT_18
| Vehicle Machine Gun |
(No image.) | COLLECT_19
| MOVING_COLLECT_19
| Tank Gun (crashes unless you are in a Tank) |
(No image.) | COLLECT_20
| MOVING_COLLECT_20
| Water Cannon (not collectable) |
(No image.) | COLLECT_21
| MOVING_COLLECT_21
| Vehicle Flamethrower (not collectable) |
(No image.) | COLLECT_22
| MOVING_COLLECT_22
| Jeep Gun (not collectable) |
(No image.) | COLLECT_23
| MOVING_COLLECT_23
| Vehicle Instant Bomb |
![]() | COLLECT_28
| MOVING_COLLECT_28
| Multiplier Bonus |
![]() | COLLECT_29
| MOVING_COLLECT_29
| Life Bonus |
![]() | COLLECT_30
| MOVING_COLLECT_30
| Health Bonus |
![]() | COLLECT_31
| MOVING_COLLECT_31
| Armour Bonus |
![]() | COLLECT_32
| MOVING_COLLECT_32
| Get Out of Jail Free Bonus |
![]() | COLLECT_33
| MOVING_COLLECT_33
| Cop Bribe Bonus |
![]() | COLLECT_34
| MOVING_COLLECT_34
| Invulnerability Bonus |
![]() | COLLECT_35
| MOVING_COLLECT_35
| Double Damage Bonus |
![]() | COLLECT_36
| MOVING_COLLECT_36
| Double Fire Rate Bonus |
![]() | COLLECT_37
| MOVING_COLLECT_37
| Electro Fingers Bonus |
![]() | COLLECT_38
| MOVING_COLLECT_38
| Respect Bonus |
![]() | COLLECT_39
| MOVING_COLLECT_39
| Invisibility Bonus |
![]() | COLLECT_40
| MOVING_COLLECT_40
| Temporary Gang Bonus (multiplayer only) |
Any numbers left out of here (e.g. COLLECT_07
) has nothing affiliated to it, but they can actually be used for making special weapons or something. If you put down the Vehicle Instant Bomb, a wierd blue letter I will appear. You will have to make some new graphics to use this.
Create a Respawning Weapon
To use these in your script, just use the following commands:
GENERATOR name = (X,Y,Z) rotation TYPE mindelay maxdelay ammo
So, you could have one like this:
GENERATOR flamer01 = (10.5,42.5,3.0) 0 COLLECT_08 1500 1500 20
And after a set amount of time, this generator will appear. Since the generators are default set to OFF
, you need to switch them on. To do this, type this in after the LEVELSTART
command:
SWITCH_GENERATOR (name, ON)
SWITCH_GENERATOR (name, OFF)
The latter is best if a weapon is only available during a mission. It stops being available after the mission, this way.
Powerups Which Do Not Respawn
Instead of making a generator that produces weapons, you can make one-off powerups by using the OBJECT_DATA
command. Below is an example of a single flamethrower pickup but any generator type can be used:
OBJECT_DATA weapon = (127.5,127.5,2.0) 180 COLLECT_08 // flamethrower
The ammo given is the default setting (such as 10 for machine gun) and cannot be changed. This is just a very basic powerup.
Character Weapons
Picture | Script Name | Game Name |
---|---|---|
![]() | PISTOL
| Pistol |
![]() | MACHINE_GUN
| S-Uzi Machine Gun |
![]() | GRENADE
| Grenade |
![]() | MOLOTOV
| Molotov Cocktail |
![]() | ROCKET_LAUNCHER
| Rocket Launcher |
![]() | FLAME_THROWER
| Flame Thrower |
![]() | ELECTRO_GUN
| Electro Gun |
![]() | ELECTRO_BATON
| Electro Baton (not supposed to be in game) |
![]() | DUAL_PISTOL
| Dual Pistol |
![]() | SHOTGUN
| Shotgun |
![]() | SILENCED_MACHINE_GUN
| Silenced S-Uzi Machine Gun |
(No image.) | MICROWAVE
| Illegal model which crashes the game. |
Vehicle Weapons
Picture | Script Name | Game Name |
---|---|---|
![]() | CAR_BOMB
| Vehicle Bomb |
![]() | CAR_OIL
| Vehicle Oil Slick |
![]() | CAR_MINE
| Vehicle Mines |
![]() | CAR_MACHINE_GUN
| Vehicle Machine Guns |
![]() | TANK_GUN
| Tank Gun |
![]() | CAR_FLAMETHROWER
| Car Flamethrower |
![]() | WATER_CANNON
| Water Cannon |
![]() | JEEP_GUN
| Jeep Mounted Machine Gun |
![]() | CAR_BOMB_INSTANT
| Instant Vehicle Bomb |
If you want to give a mission character of vehicle, just copy an example:
GIVE_WEAPON (name, weapon)
GIVE_WEAPON (name, weapon, ammount of ammo)
The name can either be a created character, a car or a player. An example could be:
GIVE_WEAPON (p1, PISTOL, 50)
This would give the player p1
a pistol with 50
rounds of ammunition. Simple.
(Originally written by Chris “Pyro” Hockley and formatted by Ben “Cerbera” Millard with full permission.)