Mads' Resource Documentation
  • 📺Youtube
  • 🤝Discord
  • ⭐Tebex
  • 👨‍💻GitHub
  • 👋Welcome!
  • General Info
    • ❓Questions and Answers
      • Is X script locked/encrypted?
      • I need support, where can I reach out?
      • How do I update my server artifacts?
      • How do I transfer a script from one account to another?
      • How do I set my game build?
    • ⚠️Common Problems
      • You lack the required entitlement
      • Failed to verify protected resource
      • Could not find dependency /assetpacks for resource
  • Resources
    • 🪑Sit Anywhere
      • Adding Custom Models
      • Falling Through the Map
      • Exports
      • Events
    • 🚁Helicopter Camera
      • Adding custom helicopters
      • Moving the UI above the minimap
      • Adding controller inputs
      • Controls
      • Exports
      • Events
    • 🚙Slash Tires
      • Exports
      • Events
    • 🕶️Stungrenade
      • Adding the Stungrenade as an item
      • Measures Against Cheaters
      • Exports
      • Events
    • 🪖CS Styled Killfeed
      • General Information
      • Exports - Client Side
      • Exports - Server Side
      • Examples
      • Adding Messages to the feed
      • Weapons List / Death Reasons
      • Changing the position if the killfeed
    • Crouch & Crawl
      • Exports
    • 🔫Taser Effect
    • 🔭Telescopes
    • 🩺Crutches
      • How to make the script compatible with ps-walkstyle
    • ⛽No Exploding Pumps
    • 👠Hookers
Powered by GitBook
On this page
  1. Resources
  2. Sit Anywhere

Events

There are 6 events that can be used by external scripts, and all of them are client-side.

List of events: sit:onSit, sit:onLay, sit:onGetUp, sit:sitDown, sit:layDown, sit:getUp

Examples

-- These are triggered by the script when their respective actions are fired.
AddEventHandler('sit:onSit', function()
   print('sit:onSit')
end)

AddEventHandler('sit:onLay', function()
   print('sit:onLay')
end)

AddEventHandler('sit:onGetUp', function(type)
    print('sit:onGetUp', type)
end)

-- These (net) events can be used to make the script do things (for usage in a radial menu for example)
TriggerEvent('sit:sitDown') -- Same as exports.sit:SitOnClosestSeat()
TriggerEvent('sit:layDown') -- Same as exports.sit:LayOnClosestBed()
TriggerEvent('sit:getUp') -- Same as exports.sit:StopCurrentAction()

-- These events can also be triggered from the server
TriggerClientEvent('sit:sitDown', serverId)
TriggerClientEvent('sit:layDown', serverId)
TriggerClientEvent('sit:getUp', serverId)
PreviousExportsNextHelicopter Camera

Last updated 1 year ago

🪑