Trying to keep superadmins from being arrested.

Hey guys, i’m trying to make it so that superadmins in my DarkRP server can’t be arrested.
Any help at all would be great.


local function bleh_OnPlayerArrested(criminal, time, actor)
        if criminal:CheckGroup("superadmin") then
                criminal:Unarrest()
                actor:ChatPrint("You can't arrest super-admins!")
        end
end

What’s your problem?

Well, i think the hook isn’t being called, i have this code in “lua/autorun/server” and when i put something like Print “hello” it does come up in console. But superadmins can still be arrested.
Also, i’m not even sure if the code is remotely correct.

That’s fucking stupid.

sounds hilarious to me

Best thing would probably be to tie into the original arrest function. Paste the original arrest function and I’m sure we can whip something up… Player:IsSuperAdmin( ) would be the function you need.

Question though, are super admins not allowed to play the game?? It seems odd to give administrators arrest immunity unless they aren’t allowed to play…

Seems like a silly idea to me.

Anyway, have you actually added the hook? (hook.Add)

It’d better if you make so that anyone on the job ‘Admin On Duty’ can’t get arrested.

So after fiddling with a couple thngs. I got it working correctly.
I ended up editing the cade for the arrest stick.
Enter this after line 122 and it should work for anyone else who may need it.