SHEEN SCRIPTS
  • SHEEN SCRIPTS
    • Store
    • Discord
  • Paid Resources
    • sh-storages
      • Configuration
    • sh-k9
      • Installation
      • Configuration
      • Commands / Controls
      • Exports / Events
    • sh-heists
      • Installation
      • Features
      • Premade Heists
      • Configuration
        • config.lua
        • Parameters
        • Functions
        • Scenes
        • Minigames
        • NPC States
      • API (for developers)
      • FAQ
    • sh-heists_v2 (WIP)
      • Installation Guide
      • Documentation
        • Configuration Files
        • Parameters
        • Minigames
        • Scenes
        • Tips & Tricks
    • sh-cemetery
      • Configuration
    • sh-buddy
      • Configuration
    • sh-player_carjacking
      • Configuration
    • sh-bowling
      • Configuration
    • sh-fights
      • Configuration
    • sh-chopshop_v2
      • Configuration
    • sh-chopshop
      • Configuration
    • sh-yoga
      • Configuration
  • Free Resources
    • sh-gifts
    • sh-jobcenter
    • sh-guidebook
    • sh-elevator
    • sh-jobCreator
Powered by GitBook
On this page
  • Basic Information
  • How to call events
  • How to call unique functions
  • List of premade functions
  • START
  • MAIN
  • CLEAR
  • NOTIFY
  • CALL_ALERT
  • SET_NPC_STATE
  • TELEPORT
  • DELETE_ENTITIES
  • DOOR_SYSTEM
  • LASER
  • REMOVE_LASER
  • FINGERPRINT
  • START_GAS
  • STOP_GAS
  • ALARM
  • LOCK_DOOR
  • UNLOCK_DOOR
  • Function List
  1. Paid Resources
  2. sh-heists
  3. Configuration

Functions

List and explanation of all functions and how to use them. (Work in progress)

Basic Information

  • You are able to call premade functions or events.

  • If you call unique names, you are able to trigger spawning of NPCs or enable action spots.

  • Functions are triggered one by one.

How to call events

Example
Functions = { 
    [1] = {
        type = 'event', 
        eventType = 'client' -- 'client' or 'server'
        name = 'sh-heists:EventExample',
        params? = data: table
        delay? = number -- 1000 = 1 second 
    } 
}

How to call unique functions

  • I mentioned above that you are able to call your own unique function names. With this feature you can assign NPCs and action spots to these unique names to spawn/create/trigger them. It works also for premade functions like: START, MAIN

Functions = { 
    [1] = { type = 'function', name = 'ANYTHING' },
    [2] = { type = 'function', name = 'SPAWN_PHASE_2' },
}

List of premade functions

  • Complete list of premade functions and some explanation of them.

START

  • Triggers 'cooldown' timer of heist.

  • You can trigger the function unlimited times, even if it's started. It will keep just one timer without reset.

Functions = { [1] = {type = 'function', name = 'START'} }

MAIN

  • This function is triggered at start. You can assign this to action spots or npcs to spawn them instantly.

Functions = { [1] = {type = 'function', name = 'MAIN'} }

CLEAR

  • Clears all entities and disables checkpoints with actions spots. Only works if heist has ongoing cooldown.

Functions = { [1] = {type = 'function', name = 'CLEAR'} }

NOTIFY

  • Shows notify on the screen.

Example
Functions = { 
    [1] = {
        type = 'function', 
        name = 'NOTIFY',
        params = { 
            text = 'Hey!', -- text
            type = 'success', -- 'success', 'error', 'inform'
            time = 5 -- seconds
        }
    } 
}

CALL_ALERT

  • Triggers alert to all defined jobs in main config of script.

Functions = { [1] = {type = 'function', name = 'CALL_ALERT'} }

SET_NPC_STATE

  • Calling this function you are able to switch relationships between players and npcs in the heist.

Example
Functions = { 
    [1] = {
        type = 'function', 
        name = 'SET_NPC_STATE',
        params = { 
            heist = string or number, -- ex. 'Humane Labs',
            state = number -- ex. 5
        }
    } 
}

--[[ 
    available states:
        0 - companion
        1 - respect
        2 - like
        3 - neutral
        4 - dislike
        5 - hate
]]

TELEPORT

  • Allows player to teleport to any location.

Example
Functions = { 
    [1] = {
        type = 'function', 
        name = 'TELEPORT',
        params = {
            pos = vec4(0.0, 0.0, 0.0, 0.0)
        }
    } 
}

DELETE_ENTITIES

  • Deletes entities with specific spawn name inside the heist.

Example
Functions = { 
    [1] = {
        type = 'function', 
        name = 'DELETE_ENTITIES',
        params = {
            spawn = 'START'
        }
    } 
}

DOOR_SYSTEM

  • Used for door system to open/close door inside the heist.

Example
Functions = { 
    [1] = {
        type = 'function', 
        name = 'DOOR_SYSTEM',
        params = {
            id = 1, -- id specified from DoorSystem table in configuration
            open = true -- true / false to open / close
        }
    } 
}

LASER

  • Create laser at designated position.

Example
Functions = { 
    [1] = {
        type = 'function', 
        name = 'LASER',
        params = {
            matrix = {
                -- insert matrix
                -- you can copy current matrix from the debug menu
                vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0),
                vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0)
            },
            settings = {
                uniqueId = 7879, -- always unique id, can't be same in any heist!
                length = 5, -- length of lasers
                distance = 10.0, -- drawing distance for lasers
                
                onTouch = {
                    LockActions = { }, -- insert action id numbers
                    Functions = { }
                }
            }
        }
    } 
}

REMOVE_LASER

  • Removes laser from position.

Example
Functions = { 
    [1] = {
        type = 'function', 
        name = 'REMOVE_LASER',
        params = {
            id = 7879 -- insert id of laser
        }
    } 
}

FINGERPRINT

  • Drops fingerprint on current location of player.

  • Depends on your evidence system.

  • Currently it's connected to stock qb-policejob evidence, but the function is opened in bridge/client/utils.lua to modify.

Example
Functions = { 
    [1] = {
        type = 'function', 
        name = 'FINGERPRINT',
        params = {
            chance = 100 -- from 1 to 100
        }
    } 
}

START_GAS

  • Starts gas at designated position.

Example
Functions = { 
    [1] = {
        type = 'function', 
        name = 'START_GAS',
        params = {
            unique_id = 44444, -- always unique id
            timer = 1, -- means it will start the gas in x minutes
            locations = {
                vec3(0.0, 0.0, 0.0),
                vec3(0.0, 0.0, 0.0)
            }
        }
    } 
}

STOP_GAS

  • Stops gas with specific id.

Example
Functions = { 
    [1] = {
        type = 'function', 
        name = 'STOP_GAS',
        params = {
            unique_id = 44444, -- id of gas
        }
    } 
}

ALARM

  • Triggers alarm at designated location.

Example
Functions = { 
    [1] = {
        type = 'function', 
        name = 'ALARM',
        params = {
            coords = vec3(0.0, 0.0, 0.0), -- x y z
            duration = 180 -- seconds
        }
    } 
}

LOCK_DOOR

  • Only for qb and ox doorlocks.

Example
Functions = { 
    [1] = {
        type = 'function', 
        name = 'LOCK_DOOR',
        params = {
            id = 'doorlock_id'
        }
    } 
}

UNLOCK_DOOR

  • Only for qb and ox doorlocks.

Example
Functions = { 
    [1] = {
        type = 'function', 
        name = 'UNLOCK_DOOR',
        params = {
            id = 'doorlock_id'
        }
    } 
}

Function List

Functions
Functions = {
    { 
        type = 'function', 
        name = 'START' 
    },
    { 
        type = 'function', 
        name = 'CLEAR', 
    },
    { 
        type = 'function', 
        name = 'CALL_ALERT' 
    },
    { 
        type = 'function', 
        name = 'SET_NPC_STATE', 
        params = { state = number } 
    },
    { 
        type = 'function', 
        name = 'FINGERPRINT', 
        params = { chance = number } 
    },
    { 
        type = 'function', 
        name = 'DELETE_ENTITIES', 
        params = { spawn = 'START' } 
    },
    { 
        type = 'function', 
        name = 'NOTIFY', 
        params = {
            text = 'You sneak in...', 
            type = 'inform',
            time = 3 -- seconds
        } 
    },
    { 
        type = 'function', 
        name = 'DOOR_SYSTEM', 
        params = { id = index, open = boolean } 
    },
    { 
        type = 'function', 
        name = 'LASER', 
        params = { matrix = table, settings = table } 
    },
    { 
        type = 'function', 
        name = 'REMOVE_LASER', 
        params = { id = unique_id }
    },
    { 
        type = 'function', 
        name = 'CUTSCENE', 
        params = { cutscene, coords, persons, position } 
    },
    { 
        type = 'function', 
        name = 'TELEPORT', 
        params = { pos = vector4 } 
    },
    {
        type = 'function', 
        name = 'START_GAS', 
        params = { unique_id = number or string, timer = number, locations = table } 
    },
    {
        type = 'function', 
        name = 'STOP_GAS', 
        params = { unique_id = number } 
    },
    {
        type = 'function', 
        name = 'UNLOCK_DOOR', 
        params = { id = number or string, } 
    },
    {
        type = 'function', 
        name = 'LOCK_DOOR', 
        params = { id = number or string } 
    }
}
PreviousParametersNextScenes

Last updated 5 months ago

Read more about NPC system functionality at this .

link