Difference between revisions of "02DD"

From GTAMods Wiki
Jump to navigation Jump to search
(Created page with '{{OpCode | ini = 02DD=5,%5d% = %1s% %2h% %3h% %4h% | description = Gets a ped in a specific zone with the selected properties. | p1 = Ped handle | p2 …')
 
m (added iii)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{OpCode
 
{{OpCode
| ini        = 02DD=5,%5d% = %1s%  %2h%  %3h%  %4h%
+
| games      = {{Icon|t}}
| description = Gets a ped in a specific zone with the selected properties.
+
| command    = GET_RANDOM_CHAR_IN_ZONE
| p1          = Ped handle
+
| description = Gets a random character in the zone
| p2          = Zone name defined in <code>info.zon</code> file.
+
| syntax1    = {{Icon|3}} 02DD: get_random_actor [''var''] in_zone '[''string'']'
| p3          = Boolean (0/1)
+
| syntax2    = {{Icon|VC}} {{Icon|SA}} 02DD: get_random_actor [''var''] in_zone '[''string'']' [''int1''] [''int2''] [''int3'']
| p4          = Boolean (0/1)
+
| p1t        = [''string'']
| p5          = Boolean (0/1)
+
| p1d        = [[ZON|Zone name]]
| game        = [[GTA3]], [[Vice City]], [[San Andreas]]
+
| p2t        = [''int1'']
 +
| p2d        = 0 = don't get civilians, 1 = get civilians
 +
| p3t        = [''int2'']
 +
| p3d        = 0 = don't get gang members, 1 = get gang members
 +
| p4t        = [''int3'']
 +
| p4d        = 0 = don't get criminals and prostitutes, 1 = get criminals and prostitutes
 +
| p5t        = [''var'']
 +
| p5d        = Variable to store the handle of the character
 
}}
 
}}
  
This opcode sets a ped in a specific zone with the selected properties.
+
This opcode gets a random non-mission character in the zone based on its [[ped type]] and turns it into a mission character. There are three categories that the opcode looks for: civilian (CIVMALE and CIVFEMALE), gang members (GANG1, GANG2, GANG3, GANG4, GANG5, GANG6, GANG7, GANG8, and GANG9), and criminals and prostitutes (CRIMINAL and PROSTITUTE). For GTA III, it looks for the same ped types without categorizing them. If the opcode fails to get anything, it returns ''-1''.
  
==Sanny Builder Example==
+
== Keywords ==
<source lang="scm">02DD: 88@ = get_random_ped_in_zone 'SAN_AND' with_pedtype_civilian 1 gang 0 criminal/prostitute 1</source>
+
get, random, ped, actor, character, zone, area
 
 
==Keywords==
 
heli, simulate, crash, landing
 

Latest revision as of 14:47, 19 November 2016

GTA III Vice City San Andreas GET_RANDOM_CHAR_IN_ZONE


Description
Gets a random character in the zone
Syntax
GTA III 02DD: get_random_actor [var] in_zone '[string]'
Vice City San Andreas 02DD: get_random_actor [var] in_zone '[string]' [int1] [int2] [int3]
Parameter
[string]
Zone name
[int1]
0 = don't get civilians, 1 = get civilians
[int2]
0 = don't get gang members, 1 = get gang members
[int3]
0 = don't get criminals and prostitutes, 1 = get criminals and prostitutes
[var]
Variable to store the handle of the character

This opcode gets a random non-mission character in the zone based on its ped type and turns it into a mission character. There are three categories that the opcode looks for: civilian (CIVMALE and CIVFEMALE), gang members (GANG1, GANG2, GANG3, GANG4, GANG5, GANG6, GANG7, GANG8, and GANG9), and criminals and prostitutes (CRIMINAL and PROSTITUTE). For GTA III, it looks for the same ped types without categorizing them. If the opcode fails to get anything, it returns -1.

Keywords

get, random, ped, actor, character, zone, area