02DD

From GTAMods Wiki
Jump to navigation Jump to search

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