<!-- fivemad.com, Markdown source of https://fivemad.com/docs/videos/scripting-in-depth -->
> Source: https://fivemad.com/docs/videos/scripting-in-depth
> Section: Video tutorials
> Level: Intermediate
> Site map for assistants: https://fivemad.com/llms.txt

# Scripting in depth

Next steps after the basics: state bags, routing buckets, MySQL, exports, advanced Lua, complete job and crafting systems, plus JavaScript and C#.

10 videos, 3 h 15 min in total. The videos are on YouTube and are not ours.

## Lessons

1. [How to use State Bags (FiveM Lua Scripting Master Series)](https://www.youtube.com/watch?v=6CSXtJpH0qQ) by CharlesHacks (14:27)
   State bags explained with examples: syncing player and entity data without hand written events.
2. [FiveM Scripting - Routing Buckets](https://www.youtube.com/watch?v=aAatwMN-vAw) by Twisle (16:37)
   Routing buckets for instanced worlds: apartments, character selection and events.
3. [FiveM Lua Scripting How to Use MySQL Database (Zero to Hero Episode 8)](https://www.youtube.com/watch?v=oV1JG4UCbek) by CharlesHacks (35:31)
   Using a MySQL/MariaDB database from your resource: queries, inserts and async code.
4. [FiveM Scripting 15 - Server and Client Sided Exports](https://www.youtube.com/watch?v=7VvwSEXYO-w) by Jeva (15:45)
   Client and server exports for sharing functions between resources. Older, but the concept hasn't changed.
5. [Advanced FiveM Lua Features (FiveM Lua Scripting Master Series)](https://www.youtube.com/watch?v=mOyxKWvrAPk) by CharlesHacks (8:19)
   Advanced Lua features FiveM supports, useful once the basics feel easy.
6. [FiveM Scripting - Making A Trucking Job Pt. 1](https://www.youtube.com/watch?v=2oloy-5Ra9w) by Twisle (24:45)
   Building a complete trucking job, part one: planning, config and the first working loop.
7. [FiveM Scripting - Making A Trucking Job Pt. 2](https://www.youtube.com/watch?v=TfdajJ2AHP8) by Twisle (23:08)
   Part two of the trucking job: finishing the gameplay and paying players safely.
8. [FiveM Scripting - Customizable Crafting System](https://www.youtube.com/watch?v=MuciDhjrBeY) by Twisle (37:26)
   A configurable crafting system built from scratch, a good exercise in data driven design.
9. [FiveM Scripting 17 - Intro to JS](https://www.youtube.com/watch?v=2NgV0kVdDkE) by Jeva (11:01)
   An introduction to writing FiveM scripts in JavaScript instead of Lua. Older, but the basics still apply.
10. [FiveM Dev Tutorial: Creating Your First Resource in C# - Episode 1](https://www.youtube.com/watch?v=J5VejWhYf7E) by Mooshe (8:21)
   Creating a first resource in C#. An old video, still the clearest short intro to the C# workflow.
