// example of using Alloc Function
DEFINE OBJECTS 0
DEFINE MISSIONS 0
DEFINE EXTERNAL_SCRIPTS -1 // Use -1 to not write AAA script
DEFINE UNKNOWN_EMPTY_SEGMENT 0
DEFINE UNKNOWN_THREADS_MEMORY 0
// --------------------
// THE STRIPPED MAIN THREAD
// contains initial info
// --------------------
thread 'MAIN'
var
$PLAYER_CHAR : Player
end
01F0: set_max_wanted_level_to 6
set_wb_check_to 0
00C0: set_current_time 8 0
04E4: unknown_refresh_game_renderer_at 2488.5601 -1666.84
[Link](2488.5601, -1666.84, 13.38)
alloc($PLAYER_CHAR, 10) // the variable $PLAYER_CHAR will be located at memory
address 10
$PLAYER_CHAR = [Link](#NULL, 2488.5601, -1666.84, 13.38)
// we know that player's handle was stored at address 10
// so, use DMA to give money to the player
[Link]($10) += 333
$PLAYER_ACTOR = [Link]($PLAYER_CHAR)
[Link]
set_weather 0
wait 0
$PLAYER_CHAR.SetClothes("PLAYER_FACE", "HEAD", Head)
$PLAYER_CHAR.SetClothes("JEANSDENIM", "JEANS", Legs)
$PLAYER_CHAR.SetClothes("SNEAKERBINCBLK", "SNEAKER", Shoes)
$PLAYER_CHAR.SetClothes("VEST", "VEST", Torso)
$PLAYER_CHAR.Build
$PLAYER_CHAR.CanMove = True
fade 1 (out) 0 ms
select_interior 0
016C: restart_if_wasted at 2027.77 -1420.52 15.99 angle 137.0 unknown 0
016D: restart_if_busted at 1550.68 -1675.49 14.51 angle 90.0 unknown 0
end_thread