Government in GTA 2 Coding
You can tell GTA 2 to have a set wanted level. Usually, the first level has four heads (Cops and SWAT Teams), second level has five heads (adds the FBI) and the third level has six heads (adds the National Guard).
To declare this, add this to your script file:
DECLARE_POLICELEVEL ( number of heads )
This tells it how many heads there should be in this level, from 1 through to 6. I think if you add any more than 6, the game crashes. If you want you can also set it as 0 for no cops. You'll probably have to change the map zones to reduce the amount of walking cops and driving cops to zero or they will still go after you. If you get level one wanted level and kill enough people a second head usually appears, but since you've set it to zero it gets removed! Now, your code could look like this:
DECLARE_POLICELEVEL ( 6 )
This bit of code tells it the maximum is six heads (National Guard).
Law Enforcement Levels
| Level | Agencies | Vehicles Used |
|---|---|---|
1
| Weak, slow Police | Cop Car |
2
| Fast but weak Police | Cop Car |
3
| Fast, strong Police | Cop Car |
4
| Police and SWAT Teams | Cop Car, SWAT Van |
5
| FBI | Special Agent Car |
6
| National Guard | Armed Land Roamers, Land Roamers, Pacifiers and Tanks |
Clear Wanted Level
If you wish to clear the amount of heads (as in, remove the players wanted level), just add this code:
CLEAR_WANTED_LEVEL ( player name )
This effectively removes your wanted level. Best used at the end of missions. Your code could look like this:
CLEAR_WANTED_LEVEL ( p1 )
Change Police Level
Another interesting bit of code is to change the amount of heads during a level (still 0 to 6 applies). Do this by adding this code:
CHANGE_POLICE_LEVEL ( new number of heads )
This is best used for missions, and the code will look like:
CHANGE_POLICE_LEVEL ( 5 )
Set Car Emergency Lights
You've got a created cop car in your mission outside a bank where the player exits. You want the cops to go for the player. But if you look, the cop lights aren’t even on! This can be fixed. So long as it is an emergency vehicle, it'll work. Add this code:
SET_CAR_EMERG_LIGHTS ( car name , ON )
SET_CAR_EMERG_LIGHTS ( car name , OFF )
Just make sure the car name is a emergency vehicle, otherwise it won’t do anything!
(Originally written by Chris “Pyro” Hockley and formatted by Ben “Cerbera” Millard with full permission.)