Difference between revisions of "03F1"
(redo table) |
|||
Line 14: | Line 14: | ||
== Ped threats == | == Ped threats == | ||
− | {| class="wikitable center-col-1" | + | {|class="wikitable center-col-1" |
− | ! rowspan="2" | Flag || rowspan="2" | Binary || colspan="2" | [[SCM language III/VC definitions#THREAT|Enum]] | + | !rowspan="2" |Flag ||rowspan="2" |Binary ||colspan="2" |[[SCM language III/VC definitions#THREAT|Enum]] |
|- | |- | ||
− | ! {{Icon|3}} || {{Icon|VC}} | + | !{{Icon|3}} ||{{Icon|VC}} |
|- | |- | ||
− | | 1 | + | |1 |
− | | <code>00 0000 0000 0000 0000 0000 0001</code> | + | |<code>00 0000 0000 0000 0000 0000 0001</code> |
− | | colspan="2" {{a|c}} | THREAT_PLAYER1 | + | |colspan="2" {{a|c}} |THREAT_PLAYER1 |
|- | |- | ||
− | | 2 | + | |2 |
− | | <code>00 0000 0000 0000 0000 0000 0010</code> | + | |<code>00 0000 0000 0000 0000 0000 0010</code> |
− | | colspan="2" {{a|c}} | THREAT_PLAYER2 | + | |colspan="2" {{a|c}} |THREAT_PLAYER2 |
|- | |- | ||
− | | 4 | + | |4 |
− | | <code>00 0000 0000 0000 0000 0000 0100</code> | + | |<code>00 0000 0000 0000 0000 0000 0100</code> |
− | | colspan="2" {{a|c}} | THREAT_PLAYER3 | + | |colspan="2" {{a|c}} |THREAT_PLAYER3 |
|- | |- | ||
− | | 8 | + | |8 |
− | | <code>00 0000 0000 0000 0000 0000 1000</code> | + | |<code>00 0000 0000 0000 0000 0000 1000</code> |
− | | colspan="2" {{a|c}} | THREAT_PLAYER4 | + | |colspan="2" {{a|c}} |THREAT_PLAYER4 |
|- | |- | ||
− | | 16 | + | |16 |
− | | <code>00 0000 0000 0000 0000 0001 0000</code> | + | |<code>00 0000 0000 0000 0000 0001 0000</code> |
− | | || THREAT_CIVMALE | + | |colspan="2" {{a|c}} |THREAT_CIVMALE |
|- | |- | ||
− | | 32 | + | |32 |
− | | <code>00 0000 0000 0000 0000 0010 0000</code> | + | |<code>00 0000 0000 0000 0000 0010 0000</code> |
− | | || THREAT_CIVFEMALE | + | |colspan="2" {{a|c}} |THREAT_CIVFEMALE |
|- | |- | ||
− | | 64 | + | |64 |
− | | <code>00 0000 0000 0000 0000 0100 0000</code> | + | |<code>00 0000 0000 0000 0000 0100 0000</code> |
− | | colspan="2" {{a|c}} | THREAT_COP | + | |colspan="2" {{a|c}} |THREAT_COP |
|- | |- | ||
− | | 128 | + | |128 |
− | | <code>00 0000 0000 0000 0000 1000 0000</code> | + | |<code>00 0000 0000 0000 0000 1000 0000</code> |
− | | THREAT_GANG_MAFIA || THREAT_GANG_CUBAN | + | |THREAT_GANG_MAFIA ||THREAT_GANG_CUBAN |
|- | |- | ||
− | | 256 | + | |256 |
− | | <code>00 0000 0000 0000 0001 0000 0000</code> | + | |<code>00 0000 0000 0000 0001 0000 0000</code> |
− | | THREAT_GANG_TRIAD || THREAT_GANG_HAITIAN | + | |THREAT_GANG_TRIAD ||THREAT_GANG_HAITIAN |
|- | |- | ||
− | | 512 | + | |512 |
− | | <code>00 0000 0000 0000 0010 0000 0000</code> | + | |<code>00 0000 0000 0000 0010 0000 0000</code> |
− | | THREAT_GANG_DIABLO || THREAT_GANG_STREET | + | |THREAT_GANG_DIABLO ||THREAT_GANG_STREET |
|- | |- | ||
− | | 1024 | + | |1024 |
− | | <code>00 0000 0000 0000 0100 0000 0000</code> | + | |<code>00 0000 0000 0000 0100 0000 0000</code> |
− | | THREAT_GANG_YAKUZA || THREAT_GANG_DIAZ | + | |THREAT_GANG_YAKUZA ||THREAT_GANG_DIAZ |
|- | |- | ||
− | | 2048 | + | |2048 |
− | | <code>00 0000 0000 0000 1000 0000 0000</code> | + | |<code>00 0000 0000 0000 1000 0000 0000</code> |
− | | || THREAT_GANG_SECURITY | + | |THREAT_GANG_YARDIE ||THREAT_GANG_SECURITY |
|- | |- | ||
− | | 4096 | + | |4096 |
− | | <code>00 0000 0000 0001 0000 0000 0000</code> | + | |<code>00 0000 0000 0001 0000 0000 0000</code> |
− | | THREAT_GANG_COLOMBIAN || THREAT_GANG_BIKER | + | |THREAT_GANG_COLOMBIAN ||THREAT_GANG_BIKER |
|- | |- | ||
− | | 8192 | + | |8192 |
− | | <code>00 0000 0000 0010 0000 0000 0000</code> | + | |<code>00 0000 0000 0010 0000 0000 0000</code> |
− | | THREAT_GANG_HOOD || THREAT_GANG_PLAYER | + | |THREAT_GANG_HOOD ||THREAT_GANG_PLAYER |
|- | |- | ||
− | | 16384 | + | |16384 |
− | | <code>00 0000 0000 0100 0000 0000 0000</code> | + | |<code>00 0000 0000 0100 0000 0000 0000</code> |
− | | || THREAT_GANG_GOLFER | + | |||THREAT_GANG_GOLFER |
|- | |- | ||
− | | 32768 | + | |32768 |
− | | <code>00 0000 0000 1000 0000 0000 0000</code> | + | |<code>00 0000 0000 1000 0000 0000 0000</code> |
− | | || THREAT_GANG9 | + | |||THREAT_GANG9 |
|- | |- | ||
− | | 65536 | + | |65536 |
− | | <code>00 0000 0001 0000 0000 0000 0000</code> | + | |<code>00 0000 0001 0000 0000 0000 0000</code> |
− | | || THREAT_EMERGENCY | + | |colspan="2" {{a|c}} |THREAT_EMERGENCY |
|- | |- | ||
− | | 131072 | + | |131072 |
− | | <code>00 0000 0010 0000 0000 0000 0000</code> | + | |<code>00 0000 0010 0000 0000 0000 0000</code> |
− | | || THREAT_PROSTITUTE | + | |colspan="2" {{a|c}} |THREAT_PROSTITUTE |
|- | |- | ||
− | | 262144 | + | |262144 |
− | | <code>00 0000 0100 0000 0000 0000 0000</code> | + | |<code>00 0000 0100 0000 0000 0000 0000</code> |
− | | || THREAT_CRIMINAL | + | |colspan="2" {{a|c}} |THREAT_CRIMINAL |
|- | |- | ||
− | | 524288 | + | |524288 |
− | | <code>00 0000 1000 0000 0000 0000 0000</code> | + | |<code>00 0000 1000 0000 0000 0000 0000</code> |
− | | colspan="2" {{a|c}} | THREAT_SPECIAL | + | |colspan="2" {{a|c}} |THREAT_SPECIAL |
|- | |- | ||
− | | 1048576 | + | |1048576 |
− | | <code>00 0001 0000 0000 0000 0000 0000</code> | + | |<code>00 0001 0000 0000 0000 0000 0000</code> |
− | | colspan="2" {{a|c}} | THREAT_GUN | + | |colspan="2" {{a|c}} |THREAT_GUN |
|- | |- | ||
− | | 2097152 | + | |2097152 |
− | | <code>00 0010 0000 0000 0000 0000 0000</code> | + | |<code>00 0010 0000 0000 0000 0000 0000</code> |
− | | colspan="2" {{a|c}} | THREAT_COP_CAR | + | |colspan="2" {{a|c}} |THREAT_COP_CAR |
|- | |- | ||
− | | 4194304 | + | |4194304 |
− | | <code>00 0100 0000 0000 0000 0000 0000</code> | + | |<code>00 0100 0000 0000 0000 0000 0000</code> |
− | | colspan="2" {{a|c}} | THREAT_FAST_CAR | + | |colspan="2" {{a|c}} |THREAT_FAST_CAR |
|- | |- | ||
− | | 8388608 | + | |8388608 |
− | | <code>00 1000 0000 0000 0000 0000 0000</code> | + | |<code>00 1000 0000 0000 0000 0000 0000</code> |
− | | || THREAT_EXPLOSION | + | |colspan="2" {{a|c}} |THREAT_EXPLOSION |
|- | |- | ||
− | | 16777216 | + | |16777216 |
− | | <code>01 0000 0000 0000 0000 0000 0000</code> | + | |<code>01 0000 0000 0000 0000 0000 0000</code> |
− | | || THREAT_FIREMAN | + | |colspan="2" {{a|c}} |THREAT_FIREMAN |
|- | |- | ||
− | | 33554432 | + | |33554432 |
− | | <code>10 0000 0000 0000 0000 0000 0000</code> | + | |<code>10 0000 0000 0000 0000 0000 0000</code> |
− | | || THREAT_DEADPEDS | + | |colspan="2" {{a|c}} |THREAT_DEADPEDS |
|} | |} | ||
Latest revision as of 05:08, 5 January 2016
- Description
- Sets the ped type's hostility to other ped types
- Syntax
- 03F1: pedtype [int1] add_threat [int2]
- Parameter
- [int1]
- Ped type
- [int2]
- Ped threat in flag field representation (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 value is represented as a flag field. 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.
Ped threats
Flag | Binary | Enum | |
---|---|---|---|
1 | 00 0000 0000 0000 0000 0000 0001
|
THREAT_PLAYER1 | |
2 | 00 0000 0000 0000 0000 0000 0010
|
THREAT_PLAYER2 | |
4 | 00 0000 0000 0000 0000 0000 0100
|
THREAT_PLAYER3 | |
8 | 00 0000 0000 0000 0000 0000 1000
|
THREAT_PLAYER4 | |
16 | 00 0000 0000 0000 0000 0001 0000
|
THREAT_CIVMALE | |
32 | 00 0000 0000 0000 0000 0010 0000
|
THREAT_CIVFEMALE | |
64 | 00 0000 0000 0000 0000 0100 0000
|
THREAT_COP | |
128 | 00 0000 0000 0000 0000 1000 0000
|
THREAT_GANG_MAFIA | THREAT_GANG_CUBAN |
256 | 00 0000 0000 0000 0001 0000 0000
|
THREAT_GANG_TRIAD | THREAT_GANG_HAITIAN |
512 | 00 0000 0000 0000 0010 0000 0000
|
THREAT_GANG_DIABLO | THREAT_GANG_STREET |
1024 | 00 0000 0000 0000 0100 0000 0000
|
THREAT_GANG_YAKUZA | THREAT_GANG_DIAZ |
2048 | 00 0000 0000 0000 1000 0000 0000
|
THREAT_GANG_YARDIE | THREAT_GANG_SECURITY |
4096 | 00 0000 0000 0001 0000 0000 0000
|
THREAT_GANG_COLOMBIAN | THREAT_GANG_BIKER |
8192 | 00 0000 0000 0010 0000 0000 0000
|
THREAT_GANG_HOOD | THREAT_GANG_PLAYER |
16384 | 00 0000 0000 0100 0000 0000 0000
|
THREAT_GANG_GOLFER | |
32768 | 00 0000 0000 1000 0000 0000 0000
|
THREAT_GANG9 | |
65536 | 00 0000 0001 0000 0000 0000 0000
|
THREAT_EMERGENCY | |
131072 | 00 0000 0010 0000 0000 0000 0000
|
THREAT_PROSTITUTE | |
262144 | 00 0000 0100 0000 0000 0000 0000
|
THREAT_CRIMINAL | |
524288 | 00 0000 1000 0000 0000 0000 0000
|
THREAT_SPECIAL | |
1048576 | 00 0001 0000 0000 0000 0000 0000
|
THREAT_GUN | |
2097152 | 00 0010 0000 0000 0000 0000 0000
|
THREAT_COP_CAR | |
4194304 | 00 0100 0000 0000 0000 0000 0000
|
THREAT_FAST_CAR | |
8388608 | 00 1000 0000 0000 0000 0000 0000
|
THREAT_EXPLOSION | |
16777216 | 01 0000 0000 0000 0000 0000 0000
|
THREAT_FIREMAN | |
33554432 | 10 0000 0000 0000 0000 0000 0000
|
THREAT_DEADPEDS |
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
set, add, threat, aggressive, hate, hostile, pedtype, gang