How do i give a new job the ability to

How do i give a new job the ability to /arrest /warrant can someone please tell me how this is done?

[lua]
concommand.Add(“smite”,function(ply)
if not ply:Team() == 2 then
ply:ChatPrint(“Invalid team!”)
return
end
end)
[/lua]

main.lua
Scroll down to find the various functions for /arrest and /warrant etc
Your code will end up looking something like
[lua]local function SearchWarrant(ply, args)
local t = ply:Team()
if not (t == TEAM_POLICE or t == TEAM_MAYOR or t == TEAM_CHIEF or t == TEAM_MYNEWTEAM) then
Notify(ply, 1, 4, string.format(LANGUAGE.must_be_x, “cop/mayor”, “/warrant”))
else[/lua]

[editline]16th February 2011[/editline]

Line 425 on the latest SVN.

[editline]16th February 2011[/editline]

Wanted has an interesting change, it is instead
[lua]local function PlayerWanted(ply, args)
local t = ply:Team()
if t ~= TEAM_POLICE and t ~= TEAM_MAYOR and t ~= TEAM_CHIEF and t ~= TEAM_MYNEWTEAM then
Notify(ply, 1, 6, string.format(LANGUAGE.must_be_x, “cop/mayor”, “/wanted”))
else[/lua] just to spice things up. Line 480.

[editline]16th February 2011[/editline]

If you happen to be thinking “My god that’s a fucking ridiculous way to do it”, then Welcome to the Lua forum. Stick around, you’ll probably fit in.

[editline]16th February 2011[/editline]

If on the other hand you are thinking “Yup that’s just how I’d do it”, then DarkRP is clearly the correct thing for you to be playing with. Rejoice!

[editline]16th February 2011[/editline]

Should you be thinking “what the fuck does ~= mean??”, you may want to go learn Lua before continuing.

[editline]16th February 2011[/editline]

If you are Falco and are wondering “hey what’s wrong with my code? D:” feel free to PM me.

[editline]16th February 2011[/editline]

case default: break;