Help with making DarkRP Custom Police Job

Please help me making a custom police job that can use commands like /warrant and /wanted just like normal CP.
Meanwhile i tryed stuff but nothing helped, if you know how, that will be very very helpful :slight_smile:

If you look in Main.lua around line 510 you’ll see this

[LUA]
function SearchWarrant(ply, args)
local t = ply:Team()
if not (t == TEAM_POLICE or t == TEAM_MAYOR or t == TEAM_CHIEF) then
Notify(ply, 1, 4, “You must be a cop or the Mayor in order to be able to make a warrant.”)
else
[/LUA]

To want to add a team that can warrant and there team name is TEAM_SUPERCOP or something just add it after TEAM_CHIEF so

[LUA]
function SearchWarrant(ply, args)
local t = ply:Team()
if not (t == TEAM_POLICE or t == TEAM_MAYOR or t == TEAM_CHIEF or t == TEAM_SUPERCOP) then
Notify(ply, 1, 4, “You must be a cop or the Mayor in order to be able to make a warrant.”)
else
[/LUA]

If you want to make it so they can want people just go to line 550 and do the same thing so

[LUA]
if not (t == TEAM_POLICE or t == TEAM_MAYOR or t == TEAM_CHIEF or t == TEAM_SUPERCOP) then
Notify(ply, 1, 6, “You must be a Cop or the Mayor in order to be able to make someone wanted.”)
[/LUA]

Then make it so they can unwant people so go to line 570 and do the same thing again
[LUA]
if not (t == TEAM_POLICE or t == TEAM_MAYOR or t == TEAM_CHIEF or t == TEAM_SUPERCOP) then
Notify(ply, 1, 6, “You must be a Cop or the Mayor in order to be able to make someone unwanted.”)
[/LUA]

[editline]01:32PM[/editline]

Also, I don’t have the SVN version so it might be different for you.

So in each line i must add the following: or t = TEAM_NAME ?
Wow now that you show me it, this looks x10 times more simpler xD Thanks A-LOT i needed it for my server… ^^

Yeah, but don’t forget the second =

Woops!! Okay, thanks ^^

How do I find the main.lua I can’t seem to find it? A little help plz


(User was banned for this post ("Dumb Bump" - Kiwi))