SR2 Lua Functions List (WIP)

Discussion in 'Guides and Tutorials' started by nclok1405, Jan 31, 2019.

Tags:
  1. This is an incomplete list of (mostly) builtin Lua functions of Saints Row 2.
    Last Update: May 1, 2019

    == Functions available in any contexts ==

    acos(arg)

    Parameters:
    arg (float) floating point value

    Returns:
    (float) the arc cosine of arg

    Description:
    Computes the principal value of the arc cosine of arg.

    Used only in hud.lua.

    Reference:
    cppreference.com

    --------------------------------------------------------------------------------

    ceil(arg)

    Parameters:
    arg (float) floating point value

    Returns:
    (float) the smallest integer value not less than arg

    Description:
    Computes the smallest integer value not less than arg.

    Reference:
    cppreference.com

    --------------------------------------------------------------------------------

    floor(arg)

    Parameters:
    arg (float) floating point value

    Returns:
    (float) the largest integer value not greater than arg

    Description:
    Computes the largest integer value not greater than arg.

    Reference:
    cppreference.com

    --------------------------------------------------------------------------------

    sqrt(arg)

    Parameters:
    arg (float) floating point value

    Returns:
    (float) square root of arg

    Description:
    Computes square root of arg.

    Used only in hud.lua.

    Reference:
    cppreference.com

    --------------------------------------------------------------------------------

    debug_print(msg1[, msg2])

    Parameters:
    msg1 (string) The message to log
    msg2 (string, optional) If present, it is concatenated to the end of msg1 (defaults to "")

    Returns:
    None

    Description:
    Send a debug log to Saints Row Powertools. Push "Scroll Lock" key to enable debug log display.
    If two strings are passed to this function they will be concatenated, but it is not recommended because Powertools does not add any separators between them.
    If Powertools is not present, this function does nothing.

    Example:
    Code (Text):

    debug_print("Hello", "World")
     
    will print "HelloWorld" to the log.

    --------------------------------------------------------------------------------

    get_frame_time_real()

    Parameters:
    None

    Returns:
    (float) Number of seconds elapsed since the last execution of thread_yield()...?

    Description:
    Some kind of time measurement function. Used only in credits.lua. Behaves identical to get_frame_time() as far as I can tell.

    --------------------------------------------------------------------------------

    get_frame_time()

    Parameters:
    None

    Returns:
    (float) Number of seconds elapsed since the last execution of thread_yield().

    Description:
    Time measurement function that returns the number of seconds elapsed since the last execution of thread_yield().
    The returned value contains the full seconds and the fractional part.

    To get the full second only, use floor(arg). To get the fractional part only, use a combination of subtraction and floor(arg):
    Code (Text):

    local time_elapsed = get_frame_time()
    local fractional = time_elapsed - floor(time_elapsed)
     
    --------------------------------------------------------------------------------

    delay(duration)

    Parameters:
    duration (float) Duration in seconds

    Returns:
    None

    Defined In:
    system_lib.lua

    Description:
    Pauses the exection of the current thread for the specified amount of time.
    Internally uses get_frame_time() for time measurement.

    --------------------------------------------------------------------------------

    rand_float(min, max)

    Parameters:
    min (float) Minimum value (inclusive)
    max (float) Maximum value (inclusive)

    Returns:
    (float) A random floating point number between min and max

    Description:
    Generates a random floating point number between min and max.

    --------------------------------------------------------------------------------

    rand_int(min, max)

    Parameters:
    min (integer) Minimum value (inclusive)
    max (integer) Maximum value (inclusive)

    Returns:
    (integer) A random integer number between min and max

    Description:
    Generates a random integer number between min and max.

    --------------------------------------------------------------------------------

    sizeof_table(tbl)

    Parameters:
    tbl (table) The target table

    Returns:
    (integer) The number of elements in the specified table

    Description:
    Get the number of elements in the specified table.
    This is needed for many table-related operations because SR2 uses Lua 5.0 released back in 2006, which lacks the # operator.

    --------------------------------------------------------------------------------

    thread_yield()

    Parameters:
    None

    Returns:
    None

    Description:
    Yield (pause) the current Lua thread and let other threads and the game engine to run.
    This function must be called once per iteration of an infinite loop or an waiting loop, otherwise the entire game freezes.

    --------------------------------------------------------------------------------

    thread_new(function_name[, params...])

    Parameters:
    function_name (string) The thread function's name. MUST BE A "DOUBLE QUOTED" STRING.
    params (any, optional) Any parameters after the function_name are passed to the specified thread function.

    Returns:
    (integer) Thread Handle

    Description:
    Creates and starts a new "Lua Thread". (However, from my testing the Lua threads of Saints Row series are most likely Coroutines, rather than a true multi-threading system)

    Use of threads allow near-parallel exection of multiple code blocks.

    The spawned thread will end its life when the thread function uses a "return" statement, reaches the end of the function block, or another thread uses thread_kill(handle) to manually kill it.

    Example:
    Code (Text):

    -- Main Function
    function hello_main()
        -- Spawn a new thread and remember its handle.
        -- A string "Hello World!" and the number 2 are passed to the thread's function.
        local handle = thread_new("my_super_awesome_thread", "Hello World!", 2)
     
        -- Pause the main thread for 5 seconds (any other threads continues to run in background)
        delay(5)
     
        -- End my awesome thread.
        thread_kill(handle)
    end

    -- Thread Function
    function my_super_awesome_thread(message, delay_seconds)
        -- This thread loops indefinitely, until other thread uses thread_kill.
        while true do
            -- Show the specified 'message' for every 'delay_seconds'.
            mission_help_table_nag(message)
            delay(delay_seconds)
     
            -- MUST CALL THIS ONCE PER LOOP OR THE GAME FREEZES!
            thread_yield()
        end
    end
     
    --------------------------------------------------------------------------------

    thread_kill(handle)

    Parameters:
    handle (integer) Thread Handle obtained from thread_new

    Returns:
    None

    Description:
    Kills the specified thread, at the specified thread's most recent thread_yield() call.

    --------------------------------------------------------------------------------

    thread_check_done(handle)

    Parameters:
    handle (integer) Thread Handle obtained from thread_new

    Returns:
    (boolean) true if the specified thread is dead, or false if alive

    Description:
    Check if the specified thread has reached the end of its life. Returns false if the thread is still alive.

    --------------------------------------------------------------------------------

    coop_is_active()

    Parameters:
    None

    Returns:
    (boolean) true if there are two players in the current game (i.e. REMOTE_PLAYER exists)

    Description:
    Check if co-op multiplayer is currently active.

    --------------------------------------------------------------------------------

    audio_play(audio_name[, type_name[, blocking[, ignore_fade]]])

    Parameters:
    audio_name (string) name of sound to play
    type_name (string, optional) name of audio source (can be "foley", "voice", "music", or "ambient"; defaults to "foley")
    blocking (boolean, optional) set to true to block until the sound starts playing, else set to false to return immediately (defaults to false)
    ignore_fade (boolean, optional) set to true to ignore the volume throttling that occurs with screen fades (defaults to false)

    Returns:
    (integer) audio instance handle, or -1 on error

    Description:
    Play a 2D sound (by name).

    Example:
    Code (Text):

    audio_play("DOOR_KICK", "foley", false)
     
    Plays the door kick foley sound.

    Reference:
    Kinzie's Toy Box

    == Functions exclusive to Gameplay Context ==

    teleport(char_name, navpoint_name[, exit_vehicle])

    Parameters:
    char_name (string) name of the character
    navpoint_name (string) name of the navpoint
    exit_vehicle (boolean, optional) set to true if the player should be removed from any vehicle he is in, or false to teleport the vehicle as well; this parameter is ignored if teleporting an NPC (defaults to false)

    Returns:
    None

    Description:
    Teleport a character to a navpoint. When teleporting the player, any followers will automatically be teleported along with the player.

    Unlike SRTT and onward, it lacks parameters such as X,Y,Z offsets. Therefore, in SR2 it is not possible to warp to an arbitrary location.

    --------------------------------------------------------------------------------

    message(msg[, duration])
    UNUSED

    Parameters:
    msg (string or float) message text to display
    duration (float, optional) duration to display the text, in seconds (defaults to 2.0)

    Returns:
    None

    Description:
    Display an arbitrary unlocalized message in the HUD.

    Unlike its counterpart in SRTT, it is not possible to have the text localized, or show the message only for specified player. It also does not return a "message handle" that can be used for quickly clearing the message from the screen.

    This function is used only by unused warp functions of "district scripts". (apartments.lua, prison.lua, etc)

    --------------------------------------------------------------------------------

    character_set_all_civilians_fleeing(character_name, distance)

    Parameters:
    character_name (string) name of the character
    distance (float) the maximum distance of civilians to affect

    Returns:
    None

    Description:
    Make the nearby civilians flee from the specified character.

    --------------------------------------------------------------------------------

    on_vehicle_stunt(func_name, name)
    UNUSED

    Parameters:
    func_name (string) name of the function, or "" to unregister the event
    name (string) name of the vehicle (or name of the player, to trigger whenever they do a stunt on any vehicle)

    Returns:
    None

    Description:
    Register a callback function for when respect is earned via a vehicle-related stunt. (but not for combat)

    When the callback is executed, the following parameters are passed to it:
    - (string) name of the vehicle
    - (float) respect earned

    --------------------------------------------------------------------------------

    on_hood_changed(func_name, name)
    UNUSED

    Parameters:
    func_name (string) name of the function, or "" to unregister the event
    name (string) name of the player

    Returns:
    None

    Description:
    Register a callback function for when the player moves to a different hood.

    When the callback is executed, the following parameters are passed to it:
    - (string) name of the player
    - (string) internal name of the hood that the player moved into
    - (string) internal name of the hood that the player came from

    This function is only referenced from ultor_base.lua in a commented-out form.

    --------------------------------------------------------------------------------

    mission_script_cancel()
    UNUSED FROM LUA

    Parameters:
    None

    Returns:
    None

    Description:
    End the currently active mission in failure, with the reason of player manually cancelling the mission or activity. Does nothing in freeroam.
    This function is not used by any of SR2's Lua scripts, but probably used internally (without any involvements of Lua) when the player pushes D-Down twice.

    --------------------------------------------------------------------------------

    vehicle_get_nitro_state(vehicle)
    UNUSED

    Parameters:
    vehicle (string) name of the vehicle

    Returns:
    (boolean) true if the vehicle's nitro is currently active

    Description:
    Check the vehicle's nitro activation status.

    --------------------------------------------------------------------------------

    vehicle_set_nitro_state(vehicle, nitro)
    UNUSED

    Parameters:
    vehicle (string) name of the vehicle
    nitro (boolean) true if the nitro should become active

    Returns:
    None

    Description:
    Forcefully activate the vehicle nitro, even if the vehicle doesn't have a nitro upgrade.
    Does not play any sound effects on its own.

    --------------------------------------------------------------------------------

    teleport_vehicle_notoriety_pos(vehicle)
    UNUSED

    Parameters:
    vehicle (string) name of the vehicle

    Returns:
    None

    Description:
    Warp the specified vehicle to a nearby, randomly-selected, notoriety vehicle spawn location.
    Also modifies the vehicle's speed for a short time.

    --------------------------------------------------------------------------------

    team_despawn(team)
    UNUSED

    Parameters:
    team (string) name of the team ("Playas", "Civilian", "Police", "Ultor", "Brotherhood", "Ronin", "Samedi", or "Neutral Gang")

    Returns:
    None

    Description:
    Despawn all nearby NPCs of the specified team.

    --------------------------------------------------------------------------------

    spawning_pedestrians([enable[, unknown]])

    Parameters:
    enable (boolean, optional) set to true to enable spawns, or false to disable (defaults to true)
    unknown (boolean, optional) can be true or false but I have no idea what it does (this param doesn't exist in SRTT)

    Returns:
    None

    Description:
    Enable/disable spawning of ambient pedestrians.

    Reference:
    Kinzie's Toy Box

    --------------------------------------------------------------------------------

    get_hood_owned_percentage()
    UNUSED

    Parameters:
    None

    Returns:
    (float) How much of Stilwater is owned by the Saints (Min:0, Max:1)

    Description:
    Get the hood owned ratio. This function skips over the hoods that cannot be claimed (Prison, Saint's Row, Nuclear Island, ocean, etc) so at the end of the game it returns 1.

    --------------------------------------------------------------------------------

    player_is_in_hood(player, hood)
    UNUSED

    Parameters:
    player (string) Player Name
    hood (string) Internal Hood Name (i.e. "sr2_ss_projects02")

    Returns:
    (boolean) true if the player is in the specified hood

    Description:
    Check if the player is currently inside the specified hood.

    --------------------------------------------------------------------------------

    hood_set_pulsing(hood_name, pulse_status[, sync_flags])
    UNUSED

    Parameters:
    hood_name (string) name of the hood
    pulse_status (boolean) set to true to start pulsing, or false to stop pulsing
    sync_flags (integer, optional) synchronization type (SYNC_LOCAL = affects local player, SYNC_REMOTE = affects remote player, or SYNC_ALL = affects both players; defaults to SYNC_ALL)

    Returns:
    None

    Description:
    Make a hood start/stop pulsing on the minimap.
    Works like "district_set_pulsing" but for an individual hood.

    --------------------------------------------------------------------------------

    objective_text(goal_index, tag[, string1[, string2[, sync_type]]])

    Parameters:
    goal_index (integer) index of the objective text to display/modify in the HUD
    tag (string) message text to display (from mission_help.xtbl) Does NOT accepts arbitrary texts; arbitrary texts will be shown as blank.
    string1 (string or float, optional) the X part of the objective text. Accepts arbitrary texts. If this param is omitted, only the tag part of the text is shown.
    string2 (string or float, optional) the Y part of the objective text. A '/' is added automatically between X and Y if this Y param is specified. Accepts arbitrary texts.
    sync_type (integer, optional) synchronization type (SYNC_LOCAL = affects local player, SYNC_REMOTE = affects remote player, or SYNC_ALL = affects both players; defaults to SYNC_ALL)

    Returns:
    None

    Description:
    Display an "X of Y" styled mission-status indicator to the HUD.

    The indicator will continue to display until changed by another call to objective_text or cleared with a call to objective_text_clear.

    Slightly different from the SRTT counterpart in that SR2 doesn't have an icon_index parameter.

    The "%s" occurrence replacement feature described in the Kinzie's Toy Box document doesn't actually exist in SR2, SRTT, or SRIV.

    --------------------------------------------------------------------------------

    hud_x_of_y_on(index, unknown, start_val, end_val)
    UNUSED

    Parameters:
    index (integer) index of the x of y indicator
    unknown (string?) seems ignored
    start_val (integer) starting value for the x of y indicator
    end_val (integer) target value (y value) of the x of y indicator

    Returns:
    None

    Description:
    Add an animated X of Y indicator to the mission HUD.

    Unlike objective_text, the X value is shown in yellow and animates when its value changes. But there is a downside: it is not possible to display a label for it. The unknown param was probably intended for the text tag, but the indicator is always unlabeled. It is also impossible to show it only for a specific player; both players are always affected.

    Has similarity with hud_x_of_y_add of SRTT.

    --------------------------------------------------------------------------------

    hud_x_of_y_set_value(index, cur_val)
    UNUSED

    Parameters:
    index (integer) index of the x of y indicator
    cur_val (integer) updated value for the x of y indicator

    Returns:
    None

    Description:
    Update the X value of an X of Y indicator.

    Has similarity with hud_x_of_y_update of SRTT.

    --------------------------------------------------------------------------------

    hud_x_of_y_off(index)
    UNUSED

    Parameters:
    index (integer) index of the x of y indicator

    Returns:
    None

    Description:
    Remove an X of Y indicator.

    Has similarity with hud_x_of_y_remove of SRTT.

    --------------------------------------------------------------------------------

    hud_x_of_y_hide(index)
    UNUSED

    Parameters:
    index (integer) index of the x of y indicator

    Returns:
    None

    Description:
    Instruct the game to ignore any future changes of the X value via "hud_x_of_y_set_value", until the X or Y indicator is removed and re-added.
    Contrary to its name, this function does NOT hide the indicator. This function is likely bugged or unfinished.

    SRTT doesn't have an equivalent of this function.

    --------------------------------------------------------------------------------

    character_get_gender(name)
    UNUSED

    Parameters:
    name (string) Name of the character

    Returns:
    (integer) Character's gender type ( GT_NONE == 0, GT_MALE == 1, GT_FEMALE == 2 )

    Description:
    Get the gender type for a given character.

    Return value is different from Kinzie's Toy Box document.

    --------------------------------------------------------------------------------

    player_creation_is_open_do()
    UNUSED

    Parameters:
    None

    Returns:
    (boolean) true if Plastic Surgeon UI is currently active

    Description:
    Check if Plastic Surgeon UI is currently active.

    Used only by an unused function "player_creation_open()" in ug_lib.lua.

    --------------------------------------------------------------------------------

    cutscene_play_check_done()

    Parameters:
    None

    Returns:
    (boolean) true if cutscene is not active

    Description:
    Check if no cutscene is running now.

    --------------------------------------------------------------------------------

    The following functions are described in Kinzie's Toy Box document and do not seem to differ between Saints Row 2 and Saints Row: The Third.

    mission_end_failure(name, failure_text) : End the mission in failure.
    mission_end_success(name[, cutscene_name, warp_locations]) : End the mission in success.
    mission_is_active([name]) : Check if a mission is currently active.
    mission_is_complete(name) : Check if a mission has been completed.
    mission_is_unlocked(name) : Check if a mission has been unlocked.
    mission_set_checkpoint(checkpoint_name[, ignore_vehicles[, ignore_notoriety]]) : Set the most recent mission checkpoint that the player has passed.
    character_is_dead(name) : Check if a character is dead (or awaiting revival).
    character_is_released(name) : Check if an NPC has been released to the world.
    character_exists(name) : Check to see if a character exists in the world.
    chainsaw_disable() : Disallow player use of the chainsaw.
    chainsaw_enable() : Allow player use of the chainsaw.
    human_shielding_disabled() : Check if human shields have been disabled in the current build. (Returns false on normal SR2, true on German SR2)
    character_dont_regenerate(name, dont_regen) : Enable/disable health regeneration on a character. UNUSED.
    on_hit_ped(func_name, name) : Register a callback function for when a vehicle collides with a pedestrian. UNUSED.
    get_team(name) : Get the name of the team to which an object belongs. UNUSED.
    set_team(npc_name, team_name) : Set which team an NPC is on.
    district_set_pulsing(district_name, pulse_status[, sync_flags]) : Make a district's neighborhoods start/stop pulsing on the minimap.
    notoriety_allow_indoor_gang_spawning(enable) : Enable/disable notoriety spawns in Rounds Square Shopping Center.
    action_nodes_enable(state) : Enable/disable all action nodes in the world. Action nodes include the player idle action spots and the stationary spawn spots of the Saints, Prostitutes, and Civilians.
    action_nodes_restrict_spawning(restricted) : Restrict/unrestrict spawning for non-notoriety action nodes. When set to true, it will disable the stationary spawn spots of the civilians. The Saints members and the strippers will still spawn.
    objective_text_clear(goal_index) : Clear an objective message.
    mission_unlock(name) : Unlock a mission or activity.
    get_char_vehicle_type_name(name) : Get the vehicle type name of a character's vehicle. UNUSED.

    --------------------------------------------------------------------------------

    The following functions either do nothing or the proper usage is unknown.

    gang_force_spawn(gang_name, spawn_override) : Used only in ep02.lua but has no effect.
    never_die(name?, flag?) : No effect, the specified character still dies. UNUSED.
    mission_debug(msg) : Most likely sent a debug message to the game during development. Powertools does NOT reenable this; you must use debug_print instead.
    script_profiler_start_section(section_name) : These four functions were probably used for Lua script performance benchmarking.
    script_profiler_end_section(section_name)
    script_profiler_do_printout()
    script_profiler_reset()
    player_creation_set_opening(flag) : Likely opened the Plastic Surgeon UI, but does nothing when used. UNUSED.
    player_creation_open() : Defined in ug_lib.lua. Likely opened the Plastic Surgeon UI but again, does nothing. UNUSED.
    player_creation_open_do() : Internal function used by the above function. Does nothing. UNUSED.
    audio_is_xmp_playing() : Check if the XBox Music Player is currently playing. Since we're not in Xbox it always returns false.
    on_tagged(func_name, tag_name?) : Likely set a callback that called when a new tag spot is completed, but the callback is never being called. UNUSED.
    reset_mp_tutorial_count() : Reset the "Strong Arm tutorial viewed" count for the "Strong Armed" achievement. Does nothing on PC.
    increment_mp_tutorial_count(tutorial_id) : Mark the specified Strong Arm tutorial as viewed. Does nothing on PC.
    get_current_hood_owner_by_position(?) : Always returns a string "No Hood" no matter what param I give. UNUSED.
    is_demo_execution() : Check if SR2 is a demo version. Used by tss01.lua which teleports the player(s) to a different location after the mission is completed.
    store_discount(shop_name?, discount?) : Probably it did something with the store discounts. I tried to feed it shop names, shop chain names, and trigger names, but it had no effect. Always returns nil so I'm sure it doesn't serve as a function to retrive current discount info. UNUSED.
    get_vehicle_special_type(handle) : Broken by design because it expects an integer handle of the vehicle which Lua scripts never get to know. Give it a mission vehicle name or player name and I always got VST_NONE (13). UNUSED.
    get_vehicle_type(handle) : Has the same flaw as above so it effectively always returns VT_NONE (6). UNUSED.

    --------------------------------------------------------------------------------

    TODO: There are a lot more functions...

    UNUSED:
    Code (Text):

    pause_menu_objective_add
    pause_menu_objective_force_show
    npc_aim_at_point
    attack_heli_get_pilot_name
    audio_play_startle_or_panic
    audio_play_emitting_id_for_character
    audio_play_emitting_id_for_mover
    camera_shake_stop
    character_slots_clear_reservations
    character_slots_reserve_for_team
    demo_completed
    homie_mission_lock_all
    homie_mission_reset
    door_is_locked
    follower_remain_in_car
    follower_ignore_distance
    forced_target_clear
    forced_target_set
    game_quit_to_main_menu
    player_holster
    hood_is_any_contested
    hud_get_fake_notoriety
    character_get_persona
    character_set_persona
    character_set_painful_ragdoll
    character_set_override_emotion
    character_clear_override_emotion
    character_voice_is_playing
    character_start_sidewalking
    ingame_effect_scale
    is_compressed_prologue
    character_is_in_interior
    character_is_inside_vehicle_bbox
    hood_owner_is
    hood_is_contested
    mesh_mover_in_player_fov
    item_is_in_vehicle
    log_append
    log_clear
    mesh_mover_action_is_done
    mesh_mover_stop_action
    mesh_mover_reset_to_action_start
    mesh_mover_kill
    minimap_npc_always_show
    mp_object_item_set_respawn_timer
    news_van_do_camera
    notoriety_set_most_important_coop_police_type
    notoriety_spawn_count
    npc_weapon_pickup_override_clear
    npc_disable_rank_reactions
    npc_jump_forward_fake
    on_ai_release
    on_mover_dropped
    on_mover_pickup
    on_entered_water
    on_ragdoll_collision
    on_recruit
    on_tailing_close
    on_tailing_far
    on_tailing_too_close
    on_taunt
    party_allow_vehicle_combat
    party_get_count
    party_get_count_alive
    persona_override_persona_stop_all
    persona_override_remove_all
    player_get_mp_team
    player_names_get_mp_team
    effect_play_for_object
    radio_off
    recruit_set_marked_flag
    recruit_set_mode
    remote_teleport_complete
    roadblocks_set_vehicle_hit_point_multiplier
    searchlight_enable
    searchlight_reset
    searchlight_set_min_notoriety
    searchlight_track_character
    searchlight_track_player_followers
    searchlight_track_players
    adjust_hit_points
    vehicle_door_open
    vehicle_door_stay_open
    vehicle_open_door_by_name
    vehicle_is_continuing_along_highway
    vehicle_allow_flat_swerve
    set_camp_flag
    shop_unlock
    shop_unlock_all
    should_skip_intro_cutscene
    spawn_set_gang_clash_team
    spawn_get_gang_clash_team
    spawn_region_set_category
    spawning_remove_all
    sprint_set_local_delay_override
    npc_use_action_node
    tutorial_suspend
    player_unholster
    vehicle_attach_to_carrier
    vehicle_chase_mover
    vehicle_degrade_control
    vehicle_detach_trailer
    chain_hitch
    vehicle_add_ignore_obstacle_handle
    vehicle_remove_ignore_obstacle_handle
    vehicle_lights_off
    vehicle_set_ambient
    helicopter_ai_go_to_enter
    helicopter_clear_missile_chance
    helicopter_clear_max_bank_angle
    vehicles_chase_dont_eject
    vehicle_player_collision_mass_adjust
    vehicle_respond_to_sirens
    vehicle_set_always_flee
    vehicle_set_as_critical
    vehicle_get_gang
    vehicle_set_hostile
    vehicle_set_ignore_rail_obstacles
    vehicle_suppress_engine_audio
    vehicle_change_variant
    debug_validate_lane
    dump_fps
     
    USED IN SOMEWHERE:
    Code (Text):

    ambient_cop_spawn_enable
    ambient_gang_spawn_enable
    attack_do
    attack_heli_create
    attack_heli_get_heli_name
    attack_heli_go
    attack_heli_init_weave_ai
    attack_heli_destroy
    attack_heli_set_drop_accuracy
    attack_heli_update
    audio_get_id
    audio_is_playing
    audio_play_do
    audio_play_id_do
    audio_play_for_cellphone
    cellphone_animate_start_do
    cellphone_animate_stop_do
    audio_play_for_character_do
    audio_play_id_for_character_do
    audio_play_for_character_weapon_do
    audio_play_persona_line
    audio_play_for_mover_do
    audio_play_for_navpoint
    audio_play_id_for_navpoint_do
    audio_play_emitting_id_for_navpoint
    audio_stop_emitting_id
    audio_stop
    audio_throttle_type
    audio_suppress_ambient_player_lines
    camera_end_look_through
    camera_look_through_do
    camera_script_is_finished
    camera_shake_start
    cash_add
    cash_remove
    cell_spawns_enable
    cellphone_receive_call
    cellphone_has_received_call
    cellphone_remove
    cellphone_reset_call
    cellphone_clear_between_call_delay
    character_has_human_shield
    character_has_specific_human_shield
    character_take_human_shield_check_done
    character_take_human_shield_do
    character_get_human_shield_name
    character_release_human_shield
    character_hide
    character_hidden
    character_ignite
    character_set_unrevivable
    character_show
    character_remove_vehicle
    character_slots_clear_caps
    character_slots_cap_for_team
    character_suppress_human_shield_idles
    character_suppress_squirted_reaction
    character_throw_havok_weapon
    character_wield_havok_weapon
    city_chunk_has_extras_loaded
    city_chunk_swap
    chunk_swap_sequence_make_permanent
    chunk_swap_sequence_start
    chunk_swap_sequence_revert
    chunk_swap_sequence_save_and_revert
    chunk_swap_sequence_restore_saved
    chunk_enable_ambient_streaming
    city_chunk_set_all_civilians_fleeing
    crib_purchasing_unlock
    npc_combat_enable
    combat_enable_sword_parries
    combat_enable_sword_strafing
    confessionals_enable
    confessionals_allow_free_one
    confessionals_get_nearest_trigger
    crib_is_unlocked
    group_create_do
    group_create_check_done
    crouch_start
    crouch_stop
    crouch_is_crouching
    cutscene_play_do
    damage_indicator_on
    damage_indicator_off
    group_is_loaded
    group_destroy
    group_hide
    group_show
    homie_mission_unlock
    homie_mission_lock
    npc_detection_enable
    distance_display_on
    distance_display_off
    door_lock
    door_open
    door_is_open
    door_close
    door_message_override
    fade_in
    fade_out
    fade_get_percent
    feedback_start
    flee
    flee_to_navpoint
    follower_make_independent
    force_ai_mode_check_done
    force_fire_do
    force_fire_object_position_do
    force_fire_pull_alt_trigger
    force_fire_target_do
    force_throw_do
    force_throw_char_do
    force_throw_from_vehicle
    npc_do_drugs
    npc_dont_auto_equip_or_unequip_weapons
    force_melee
    fov_check
    fov_check_xz_plane
    get_char_in_vehicle
    get_current_hood_by_position
    get_current_hit_points
    get_dist
    get_game_time
    get_max_hit_points
    get_vehicle_speed
    group_create_hidden_do
    npc_hearing_enable
    district_set_pulsing
    hud_bar_set_value
    hud_set_fake_notoriety
    hud_bar_set_range
    hud_bar_off
    hud_bar_on
    hud_timer_hide
    hud_timer_get_remainder
    hud_timer_pause
    hud_timer_set
    hud_timer_stop
    character_check_resource_loaded
    character_evacuate_from_all_vehicles
    character_is_ragdolled
    character_damage
    character_disallow_ragdoll
    character_allow_ragdoll
    character_is_ready
    character_is_combat_ready
    character_set_cannot_wield_havok_weapon
    npc_enable_human_collision
    character_set_cannot_be_grabbed
    character_set_cannot_be_grabbed_by_player
    character_set_damage_multiplier
    character_set_only_scripted_grabs
    character_set_combat_ready
    character_set_injured
    character_set_no_satchel_panic
    character_destroy
    character_set_walk_variant
    character_set_stand_variant
    character_set_run_variant
    character_make_priority_target
    check_animation_state
    clear_animation_state
    ingame_effect_add_npc
    ingame_effect_remove_npc
    ingame_effect_add_player
    ingame_effect_remove_player
    ingame_effect_add_vehicle
    ingame_effect_remove_vehicle
    ingame_effect_add_group
    ingame_effect_remove_group
    ingame_effect_add_item
    ingame_effect_remove_item
    ingame_effect_add_mover
    ingame_effect_remove_mover
    ingame_effect_add_navpoint
    ingame_effect_remove_navpoint
    ingame_effect_add_trigger
    ingame_effect_remove_trigger
    inv_has_item
    inv_item_add_ammo
    inv_item_add_do
    inv_weapon_add_temporary
    inv_weapon_remove_temporary
    inv_weapon_disable_all_but_this_slot
    inv_weapon_disable_slot
    inv_weapon_enable_or_disable_all_slots
    inv_item_equip
    inv_item_get_all_do
    inv_item_get_all_ammo_do
    inv_item_in_slot
    inv_item_get_equipped_item
    inv_item_is_equipped
    inv_item_is_firearm_equipped
    inv_item_remove_all
    inv_item_remove
    inv_item_remove_in_slot
    loot_item_add
    animation_is_state
    character_is_in_vehicle
    character_is_in_vehicle_transation
    character_is_in_a_driver_seat
    character_is_swimming
    get_char_vehicle_is_in_air
    get_char_vehicle_name
    get_char_vehicle_type
    get_char_vehicle_special_type
    get_char_vehicle_towed_vehicle
    follower_is_unconscious
    npc_in_player_fov
    navpoint_in_player_fov
    npc_is_in_party
    item_drop
    item_reset
    character_is_on_fire
    character_is_panicking
    character_is_player
    player_is_in_vehicle
    player_is_targeting_do
    vehicle_is_destroyed
    item_hide
    item_show
    los_check_do
    mesh_mover_destroyed
    mesh_mover_hide
    mesh_mover_play_action
    mesh_mover_reset
    mesh_mover_reset_to_action_end
    mesh_mover_show
    mesh_mover_wielding
    mesh_mover_being_wielded
    mesh_mover_wield_stop
    minimap_icon_add_group_do
    minimap_icon_add_item_do
    minimap_icon_add_navpoint_do
    minimap_icon_add_npc_do
    minimap_icon_add_player_do
    minimap_icon_add_trigger_do
    minimap_icon_add_vehicle_do
    minimap_icon_add_mover_do
    minimap_icon_add_radius
    minimap_icon_remove_group
    minimap_icon_remove_item
    minimap_icon_remove_navpoint
    minimap_icon_remove_npc
    minimap_icon_remove_player
    minimap_icon_remove_trigger
    minimap_icon_remove_vehicle
    minimap_icon_remove_mover
    minimap_icon_remove_radius
    mission_help_table_do
    mission_help_clear
    move_to_check_done
    move_to_do
    move_to_vehicle_entry_point_check_done
    move_to_vehicle_entry_point_do
    notoriety_force_no_spawn
    notoriety_get
    notoriety_get_decimal
    notoriety_reset
    notoriety_restricted_zones_enable
    notoriety_set_desired_vehicle_count
    notoriety_set
    notoriety_set_can_decay
    notoriety_set_max
    notoriety_set_min
    npc_weapon_pickup_override
    npc_weapon_spread
    npc_follow_npc
    npc_go_idle
    npc_holster
    character_kill
    npc_leash_remove
    npc_leash_to_nav
    npc_leash_set_unbreakable
    character_prevent_flinching
    character_prevent_kneecapping
    character_prevent_explosion_fling
    vehicle_prevent_explosion_fling
    vehicle_prevent_transition_to_ambient
    character_ragdoll
    npc_max_corpses_override
    npc_max_corpses_reset
    npc_respawn_after_death
    npc_respawn_after_death_time_override
    npc_respawn_dist_override
    npc_respawn_dist_reset
    npc_revive
    npc_set_boss_always_defend
    npc_set_boss_type
    npc_stop_following
    npc_suppress_persona
    npc_unholster_best_weapon
    on_collision
    on_damage
    on_incapacitated
    on_revived
    on_interior_enter
    on_interior_exit
    open_vint_dialog_do
    open_vint_dialog_check_done
    on_searchlight_track
    on_death
    on_detection
    on_dismiss
    on_door_opened
    on_finished
    on_game_time_trigger
    on_district_changed
    on_mover_destroyed
    on_mover_dislodged
    on_notoriety_event
    on_pickup
    on_projectile_hit
    on_purchase
    on_random_obj_killed
    on_respawn
    on_take_damage
    on_character_right_hand_hit
    on_panic
    on_tailing_good
    on_tailing_too_far
    on_trigger
    on_trigger_exit
    on_vehicle_destroyed
    on_vehicle_hitched
    on_vehicle_unhitched
    on_weapon_pickup
    on_weapon_equip
    on_weapon_fired
    parking_spot_enable
    on_vehicle_enter
    on_vehicle_exit
    party_add_do
    party_allow_max_followers
    party_dismiss_do
    party_dismiss_all
    party_get_follower_index
    party_set_dismissable
    party_set_recruitable
    party_swap_follower_indices
    party_use_melee_weapons_only
    path_name_is_path
    patrol
    patrol_pause
    patrol_unpause
    persona_override_character_start_do
    persona_override_character_stop_do
    persona_override_character_stop_all
    persona_override_persona_start_do
    persona_override_persona_stop_do
    action_play_is_finished
    action_play_do
    action_play_custom_do
    player_button_just_pressed
    player_controls_disable
    player_controls_enable
    player_get_custom_voice
    player_force_vehicle_seat
    player_get_nearest_trigger_of_type
    player_names_get_all
    player_warp_to_shore_disable
    player_warp_to_shore_enable
    effect_play
    get_player_respect
    radio_on
    radio_post_event
    radio_get_station
    radio_set_station
    radio_reset_station
    radio_block
    radio_set_sing_along
    release_to_world
    render_script_trigger_on_minimap_add
    render_script_trigger_on_minimap_remove
    roadblocks_enable
    screenshot_check_done
    screenshot_do
    script_assert
    set_always_sees_player_flag
    set_animation_state
    set_attack_enemies_flag
    set_attack_peds_flag
    set_attack_player_flag
    set_cant_flee_flag
    set_cops_shooting_from_vehicles
    set_cower_flee_mode
    set_current_hit_points
    vehicle_door_prevent_damage_detach
    set_blitz_flag
    set_dont_attack_me_on_sight_flag
    set_dont_drop_havok_weapons_on_idle
    set_force_combat_ready_team
    set_ignore_ai_flag
    set_ignore_burst_accuracy_flag
    set_max_hit_points
    set_mission_author
    set_ped_density
    set_perfect_aim
    set_player_can_enter_exit_vehicles
    set_player_can_be_busted
    set_police_never_fire_at_civilian_human_shields
    set_seatbelt_flag
    on_mission_item_drop
    on_mission_item_pickup
    set_never_crouch_flag
    set_time_of_day
    set_time_of_day_scale
    set_traffic_density
    set_trailing_aim_flag
    set_unjackable_flag
    set_unrecruitable_flag
    set_weather
    shop_enable
    spawning_allow_cop_ambient_spawns
    spawning_allow_gang_team_ambient_spawns
    spawning_allow_gang_ambient_spawns
    spawn_override_set_category
    spawning_boats
    spawning_vehicles
    sprint_set_local_use_override
    sprint_set_local_recharge_override
    sprint_reset_local_overrides
    npc_use_closest_action_node_of_type
    action_stop_custom
    effect_stop
    explosion_create
    finishers_disable
    finishers_enable
    parachute_disable
    parachute_enable
    object_destroy
    strstr
    subgroup_create_do
    teleport_check_done
    teleport_vehicle
    base_jumping_enable
    build_get_build_type
    bink_play_movie_do
    bink_movie_done
    trigger_enable
    trigger_get_all_with_prefix
    position_is_in_trigger
    trigger_set_delay_between_activations
    trigger_type_enable
    turn_angle_do
    turn_invulnerable
    turn_to_do
    turn_to_check_done
    turn_vulnerable
    tutorial_completed
    tutorial_lock
    tutorial_start
    tutorial_unlock
    vehicle_max_speed
    vehicle_get_max_speed
    vehicle_attach_trailer
    vehicle_chase
    vehicle_detonate
    vehicle_disable_chase
    vehicle_disable_flee
    vehicle_drag_ragdoll_start
    vehicle_drag_ragdoll_stop
    vehicle_enter_check_done
    vehicle_enter_do
    vehicle_enter_group_check_done
    vehicle_enter_group_do
    vehicle_evacuate
    vehicle_exists
    vehicle_exit_check_done
    vehicle_exit_do
    vehicle_set_explosion_damage_multiplier
    vehicle_hide
    vehicle_hidden
    vehicle_ignore_repulsors
    vehicle_infinite_mass
    vehicle_in_air
    vehicle_lights_on
    vehicle_never_flatten_tires
    vehicle_flee
    vehicle_pathfind_navmesh_do
    vehicle_pathfind_to_do
    helicopter_fly_to_do
    helicopter_go_to_change_follow_target
    helicopter_go_to_clear_follow_target
    helicopter_enter_retreat
    helicopter_go_to_set_target
    helicopter_shoot_human
    helicopter_shoot_navpoint
    helicopter_set_dont_move_in_combat
    helicopter_set_dont_use_constraints
    helicopters_set_jitter_override
    helicopter_set_missile_chance
    helicopter_set_max_bank_angle
    airplane_fly_to_do
    vehicle_pathfind_check_done
    airplane_takeoff_do
    airplane_land_do
    vehicle_turret_base_to_do
    vehicle_mark_as_players
    vehicle_repair
    vehicle_set_bulletproof_glass
    vehicle_set_crazy
    vehicle_set_dont_scare_peds
    vehicle_set_use_lockon_system
    vehicle_set_use_short_cuts
    vehicle_set_untowable
    vehicle_set_radio_controls_locked
    vehicle_set_script_hard_goto
    vehicle_set_allow_ram_ped
    vehicle_get_num_seats
    vehicle_get_smoke_and_fire_state
    vehicle_set_sirenlights
    vehicle_set_sirens
    vehicle_set_smoke_and_fire_state
    vehicle_get_driver
    vehicle_set_invulnerable_to_player_explosives
    vehicle_set_torque_multiplier
    vehicle_show
    vehicle_speed_override
    vehicle_speed_cancel
    vehicle_stop_do
    vehicle_suppress_flipping
    vehicle_suppress_npc_exit
    voodoo_glow_start
    voodoo_glow_stop
    waiting_for_player_dialog
    wander_start
    wander_stop
    customization_outfit_wear
    customization_item_wear
    customization_item_revert
    waypoint_add
    waypoint_remove
    drug_enable_disable_effect_override
    drug_effect_set_override_values
    dump_fps_tagged
    prison_blackout_nuke_zone
    prison_blackout_start
    prison_blackout_restore_everything
    prison_blackout_set_window_threshold
    group_give_to_client
     
     
    Last edited: May 1, 2019
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice