#Game: Liberty City Stories
#Author: NielsB
#Version: 1.5
#Category: Fun
#Date: 2023-01-04
#Description: Random Ped 

024C: request_model 259
024C: request_model 260
024C: request_model 261
024C: request_model 262
024C: request_model 263
024C: request_model 264
024C: request_model 265
024C: request_model 266
024C: request_model 267
024C: request_model 268
024C: request_model 269
024C: request_model 270
024C: request_model 271
024C: request_model 272
024C: request_model 273
024C: request_model 274
024C: request_model 275
024C: request_model 276
024C: request_model 277
024C: request_model 278
024C: request_model 279
024C: request_model 280
024C: request_model 281
024C: request_model 282
024C: request_model 283
024C: request_model 284
024C: request_model 285
024C: request_model 286
024C: request_model 287
024C: request_model 288
024C: request_model 289
024C: request_model 290
024C: request_model 291
024C: request_model 292
0390: load_all_models_now 

:RESTART
0001: wait 0
04C9: get_offset_from_char_in_world_coords $PLAYER_ACTOR  offset 0 3.0 2.00 store_to 0@ 1@ 2@ 
020E: generate_random_int_in_range 0 105 store_to 13@
0038:   13@ == 8
004C: goto_if_true @RESTART
0038:   13@ == 69
004C: goto_if_true @RESTART
0038:   13@ == 70
004C: goto_if_true @RESTART
0038:   13@ == 71
004C: goto_if_true @RESTART
0038:   13@ == 72
004C: goto_if_true @RESTART
0038:   13@ == 73
004C: goto_if_true @RESTART
0038:   13@ == 74
004C: goto_if_true @RESTART
0038:   13@ == 75
004C: goto_if_true @RESTART
0038:   13@ == 76
004C: goto_if_true @RESTART
0038:   13@ == 77
004C: goto_if_true @RESTART
0038:   13@ == 78
004C: goto_if_true @RESTART
0038:   13@ == 105
004C: goto_if_true @RESTART
024C: request_model 13@
0390: load_all_models_now 
009A: create_char 1 model 13@ at 0@ 1@ 2@  store_to 10@ 
0178: set_char_heading 10@ to 180.00
018C: add_blip_for_char 10@ store_to 11@
020E: generate_random_int_in_range 0 36 store_to 12@ 
01B7: give_weapon_to_char 10@ weapon 12@ ammo 99999
03EA: print_help '~b~Press Left To Dissmis                    ~g~Press Right To Accept                  ~r~Press Down To Close                ~p~Press up To Set Hostile'
:ADD
0001: wait 0
00E6:   is_button_pressed 0 button 10
004C: goto_if_true @MOVE
00E6:   is_button_pressed 0 button 11
004C: goto_if_true @JOIN
00E6:   is_button_pressed 0 button 8
004C: goto_if_true @HOST
00E6:   is_button_pressed 0 button 9
004C: goto_if_true @ENDE
0002: goto @ADD

:MOVE
0001: wait 0
01C7: mark_char_as_no_longer_needed 10@ 
0169: remove_blip 11@
0001: wait 500
0002: goto @NOO

:JOIN
0001: wait 0
01E4: tie_char 10@ to_player $PLAYER_CHAR
04FA: set_char_as_player_friend 10@ player $PLAYER_CHAR on 1
0541: set_char_in_players_group_can_fight 10@ can_fight 1
0296: set_char_heed_threats 10@ flag 1    
0228: set_char_health 10@ to 250 
0364: add_armour_to_char 10@ armour 100
0169: remove_blip 11@
0001: wait 500

:NOO
0001: wait 0
0002: goto @RESTART

:HOST
0169: remove_blip 11@
0578: set_char_stop_shoot_dont_seek_entity 10@ on 1
0438: set_char_is_chris_criminal 10@ to 1 
02E7: set_char_accuracy 10@ to 65
0296: set_char_heed_threats 10@ flag 1    
0228: set_char_health 10@ to 250
0364: add_armour_to_char 10@ armour 100
//011F: set_char 10@ search_threat 1  //PLAYER
011F: set_char 10@ search_threat 2 
011F: set_char 10@ search_threat 4 
011F: set_char 10@ search_threat 8 
011F: set_char 10@ search_threat 16 
011F: set_char 10@ search_threat 32 
011F: set_char 10@ search_threat 64 
011F: set_char 10@ search_threat 128 
011F: set_char 10@ search_threat 256 
011F: set_char 10@ search_threat 512 
011F: set_char 10@ search_threat 1024 
011F: set_char 10@ search_threat 2048 
011F: set_char 10@ search_threat 4096 
011F: set_char 10@ search_threat 8192 
011F: set_char 10@ search_threat 32768 
011F: set_char 10@ search_threat 16384 
011F: set_char 10@ search_threat 65536 
011F: set_char 10@ search_threat 131072 
011F: set_char 10@ search_threat 524288 
011F: set_char 10@ search_threat 1048576 
011F: set_char 10@ search_threat 2097152 
011F: set_char 10@ search_threat 4194304 
011F: set_char 10@ search_threat 16777216 
01C7: mark_char_as_no_longer_needed 10@
0002: goto @RESTART

:ENDE
0001: wait 0
03EB: clear_help
01C7: mark_char_as_no_longer_needed 10@
:TERM 
0169: remove_blip 11@
0001: wait 500
004E: terminate_this_script
