010E
- Description
- Sets the player's minimum wanted level
- Syntax
- 010E: set_player [player handle] minimum_wanted_level_to [int]
- Parameter
- [player handle]
- The handle of the player
- [int]
- Wanted level, range from 0 to 6
- Native analog
- ALTER_WANTED_LEVEL_NO_DROP
This opcode sets the player's current wanted level ranging from 0 to 6, similar to opcode 010D. Unlike 010D, if placed in a loop, the wanted level will not drop below the set value but a higher wanted level can be attained.
Example
The following example spawns a ped close to the player. While the ped is hurt but not killed, the player will attain a minimum wanted level of 3. The player can only clear its wanted level after the ped is killed.
// set constants const CHAR_MODEL = #BFORI // set your character model CHAR_HANDLE = 0@ X_POS = 1@ Y_POS = 2@ Z_POS = 3@ end // spawn character 0247: request_model CHAR_MODEL 038B: load_requested_models 00A0: store_actor $PLAYER_ACTOR position_to X_POS Y_POS Z_POS X_POS += 4.0 009A: CHAR_HANDLE = create_actor 4 CHAR_MODEL at X_POS Y_POS Z_POS // attain minimum wanted level while if 8118: not actor CHAR_HANDLE dead wait 10 if 8184: not actor CHAR_HANDLE health >= 95 then 010E: set_player $PLAYER_CHAR minimum_wanted_level_to 3 end end // cleanup 0249: release_model CHAR_MODEL 01C2: mark_actor_as_no_longer_needed CHAR_HANDLE
Keywords
set, change, alter, player, minimum, wanted, level, no, drop