Difference between revisions of "02DD"
Jump to navigation
Jump to search
(all zones are accepted) |
(page rewrite) |
||
Line 1: | Line 1: | ||
{{OpCode | {{OpCode | ||
− | | | + | | games = {{Icon|t}} |
− | | description = Gets a | + | | command = GET_RANDOM_CHAR_IN_ZONE |
− | | | + | | description = Gets a random character in the zone |
− | | | + | | syntax1 = 02DD: get_random_actor [''var''] in_zone '[''string'']' [''int1''] [''int2''] [''int3''] |
− | | | + | | p1t = [''var''] |
− | | | + | | p1d = Variable to store the handle of the character |
− | | | + | | p2t = [''string''] |
− | | | + | | p2d = [[ZON|Zone name]] |
+ | | p3t = [''int1''] | ||
+ | | p3d = 0 = don't get civilians, 1 = get civilians | ||
+ | | p4t = [''int2''] | ||
+ | | p4d = 0 = don't get gang members, 1 = get gang members | ||
+ | | p5t = [''int3''] | ||
+ | | p5d = 0 = don't get criminals and prostitutes, 1 = get criminals and prostitutes | ||
}} | }} | ||
− | |||
− | + | 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). | |
− | |||
− | ==Keywords== | + | == Keywords == |
get, random, ped, actor, character, zone, area | get, random, ped, actor, character, zone, area |
Revision as of 08:04, 8 June 2016
- Description
- Gets a random character in the zone
- Syntax
- 02DD: get_random_actor [var] in_zone '[string]' [int1] [int2] [int3]
- Parameter
- [var]
- Variable to store the handle of the character
- [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
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).
Keywords
get, random, ped, actor, character, zone, area