Difference between revisions of "03F1"

From GTAMods Wiki
Jump to navigation Jump to search
(new layout)
m
Line 16: Line 16:
 
The following is a list of usable flags to use as threat pedtype.
 
The following is a list of usable flags to use as threat pedtype.
 
{| {{Prettytable}}
 
{| {{Prettytable}}
! Integer 1
+
! [''int1'']
! Integer 2
+
! [''int2'']
 
! GTA III
 
! GTA III
 
! Vice City
 
! Vice City
Line 145: Line 145:
 
== Keywords ==
 
== Keywords ==
 
add, threat, aggressive, hate, hostile, pedtype, gang
 
add, threat, aggressive, hate, hostile, pedtype, gang
 +
 +
[[Category:OpCodes]]

Revision as of 23:51, 18 August 2011

GTA III Vice City


Description

Sets the ped type's hostility to other ped types

Syntax

03F1: pedtype [int1] add_threat [int2]

Parameter

[int1]
Ped type (see below)
[int2]
Threat ped type (see below)

This opcode sets the ped type's hostility to other ped types and will attack the threat ped type on sight. The threat ped type cannot overwrite hardcoded threats but it can overwrite most threats set in the ped.dat file. The threat ped type is binary converted to decimal format. The effect of this opcode can be reset using 03F2. Peds that are already spawned cannot have their hostility changed actively using this opcode; this opcode only works on newly spawned peds.

List of values

The following is a list of usable flags to use as threat pedtype.

[int1] [int2] GTA III Vice City
0 1 PLAYER1 (you)
1 2 PLAYER2 (unused)
2 4 PLAYER3 (unused)
3 8 PLAYER4 (unused)
4 16 CIVMALE
5 32 CIVFEMALE
6 64 COP
7 128 GANG1 (Mafia) GANG1 (Cubans)
8 256 GANG2 (Triads) GANG2 (Haitians)
9 512 GANG3 (Diablos) GANG3 (Streetwannabe's)
10 1024 GANG4 (Yakuza) GANG4 (Diaz's gang)
11 2048 GANG5 (Yardies) GANG5 (Security guards)
12 4096 GANG6 (Colombians) GANG6 (Biker gang)
13 8192 GANG7 Hoods GANG7 (Vercetti gang)
14 16384 GANG8 (unused) GANG8 (Golfers)
15 32768 GANG9 (unused)
16 65536 EMERGENCY (Paramedics)
17 131072 FIREMAN
18 262144 CRIMINAL
19 524288 SPECIAL

Example

The following example lets you toggle Triads/Haitians hate towards the player by pressing the CAMERA key. A number is displayed on the screen to show the gang's hostility; 0 means it is not hostile and 1 means it is. This opcode only affects newly spawned gang members; gang members already spawned will not be affected.

// set constant
const
HATE = 0@
end

// reset gang hate to player
03F2: pedgroup 8 remove_threat 1
HATE = false

// toggle gang hate to player
while true
    wait 250
    if 
        00E1:   key_pressed 0 13  // camera key
    then
        if
            HATE == false
        then
            03F1: pedtype 8 add_threat 1  // set gang hostile
            HATE = true
        else
            03F2: pedgroup 8 remove_threat 1  // set gang not hostile
            HATE = false
        end
    end
    // display gang hate as a number onscreen
    01E5: text_1number_highpriority 'NUMBER' HATE 250 ms 1
end

Keywords

add, threat, aggressive, hate, hostile, pedtype, gang