[Release] My FiveM Repository (Blackjack, minigames (drill/circuit breaker/safe cracking), tattoos, etc

Includes:

Playlist to preview contents:

Disclaimer:

I have been out of FiveM development since ~2018. I can answer some questions but do not have the ability to provide full support. These scripts are for people that want to reverse engineer code to create their own scripts.

These could be modified into standalone DLLs with little work (mostly removing logging). If someone wants to take the time to do that, they are more than welcome to.

All code is 100% mine.

14 Likes

how would i be able to put this a standalone, i run a fx server

There are several articles (or there used to be) on the fivem resources on how to compile a DLL. I don’t know the steps off the top of my head but it essentially consists of adding the correct fivem references and compiling the dll. You add it to your server.cfg like any other resource once you have it in .dll form.

See:

I am trying to make the Stance script to a dll. I have added the CitizenFX.Core.dll and that got rid of most of the red lines. But I still have some so I can’t build the project until they have all gone. I have never coded in C# before but this look really cool.

image

Yep, you’re really close. Your class needs to inherit BaseScript and then you can do:

Tick += OnTick

    public abstract class BaseScript
    {
        protected BaseScript();

        protected ExportDictionary Exports { get; }
        protected Player LocalPlayer { get; }
        protected PlayerList Players { get; }
        protected internal EventHandlerDictionary EventHandlers { get; }

        protected event Func<Task> Tick;  // This is the Tick we want to += to 

        public static Task Delay(int msecs);
        public static void RegisterScript(BaseScript script);
        [SecuritySafeCritical]
        public static void TriggerEvent(string eventName, params object[] args);
        [SecuritySafeCritical]
        public static void TriggerServerEvent(string eventName, params object[] args);
        public static void UnregisterScript(BaseScript script);
    }

Any chance you can publish the dlls as well?

Now I am completely lost. I have been looking at time for about 15 minutes not understand what this is

Dope of you to release these! very nice!

Hi, is it possible to trigger cuff anim from police job menu written in lua? I never worked with cs scripts and wanted to get cuff and uncuff anims through the police job menu

Let me know if you figured it out. I am currently asking for the same

I’ve been looking for the circuit breaker minigame for AGES, thank you sooooo much for this <3

Of course it is possible, but it would take some work from someone competent in LUA. The code is there so it is a matter of reverse engineering.

I have no idea what existing script you’re using but at the minimum you can change whatever animation string they’re using for their cuff to one used in my script.

When in doubt, just go through the decompiled scripts. You can usually put together enough of the pieces to find whatever it is you’re looking for. Just digging around in there is a huge benefit in and of itself - I learned a lot from seeing how the various functions are supposed to be prepared/called.

1 Like