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.
[CODE]local function bleh_OnPlayerArrested(criminal, time, actor)
if criminal:CheckGroup("superadmin") then
criminal:Unarrest()
actor:ChatPrint("You can't arrest super-admins!")
end
end[/CODE]
What's your problem?
[QUOTE=Lexic;40862434]What's your problem?[/QUOTE]
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.
[QUOTE=EvacX;40862527]That's fucking stupid.[/QUOTE]
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.
[QUOTE]if trace.Entity:IsPlayer() and trace.Entity:IsSuperAdmin() then
GAMEMODE:Notify(self.Owner, 1, 5, "You cannot arrest a superadmin.")
return
end[/QUOTE]
Sorry, you need to Log In to post a reply to this thread.