// example of usage of WriteMem 
// DEFINE OBJECTS 0 // no needed at all
DEFINE MISSIONS 0
//DEFINE MISSION {ID} 0 AT {LABEL} @
DEFINE EXTERNAL_SCRIPTS 0
//DEFINE SCRIPT {NAME}  AT {LABEL} @
DEFINE UNKNOWN_EMPTY_SEGMENT 0
DEFINE UNKNOWN_THREADS_MEMORY 0

// --------------------
// THE STRIPPED MAIN THREAD
// contains initial info
// --------------------                       
thread "Main" 
 var                         
  $PLAYER_CHAR: Player 
 end // var
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 
Camera.SetAtPos(2488.5601, -1666.84, 13.38)
$PLAYER_CHAR = Player.Create(#NULL, 2488.5601, -1666.84, 13.38)
$PLAYER_ACTOR = Actor.EmulateFromPlayer($PLAYER_CHAR)
Camera.SetBehindPlayer
set_weather 0          
wait 0 ms
$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                
0629: change_stat 181 (islands unlocked) to 4
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
0180: set_on_mission_flag_to $ONMISSION // Note: your missions should use the variable defined here ($ONMISSION)
  
// this will change the game gravity. Learning to fly, he :)

// WORKS ONLY IF YOU HAVE INSTALLED XIEON'S SA MEMPATCH
// TOOLS\SA MEMORY PATCH\SCRIPTPATCH.EXE
WriteMem(0x863984, 0.0015, 4, True)

end_thread

