[ESX][C#][How-To] Use ESX in C#

Hi there!
I’ve downloaded a script [Release] ar_k9 [1.2] [Standalone]

It uses fully c# no Lua except the fxmanifest.
In the sv main.cs file it calls this to check permission job.grade_name

But doesn’t work with job.name

Tried about everything I can in there.

To clarify, I want it to work with job.name instead of job.grade_name

public bool HasPermission(Player source)

        {
            if (settings.standalone == false)
            {
                dynamic player = this.ESX.GetPlayerFromId(source.Handle);
                dynamic job = player != null ? player.getJob() : null;

                if (player == null || job == null)
                    return false;

                if (job.grade_name == settings.allowedJobGrade)
                    return true;

                return false;
            }

            return IsPlayerAceAllowed(source.Handle, "k9");
        }
1 Like