I have my own DarkRP dedicated server. I am trying to make a SWAT job with the ability to want/warrant. I already know how to create a job. (Just go to shared.lua, put in the code.)
I just need to know how to add the police actions to the job. Can someone help?
The only thing i can think of is going into the Shared.Lua and putting this into the description?
Type /wanted <name> to alert the public to this criminal
Just look at the CP's code, and see what could be giving it the Cop Actions.
Speaking of DarkRP, I'm stuck in this rut because some stuff is wanting to crash my Mac when I want to go to a server.
Its lonely stuck alone in single player...
go into your player.lua which is located in your gamemode/darkrp/gamemode. Than hit Ctrl+F (to search) and search TEAM_POLICE
You should get something like this
[CODE]function meta:IsCP()
local Team = self:Team()
return Team == TEAM_POLICE or Team == TEAM_CHIEF or Team == TEAM_MAYOR
end[/CODE]
change that to this
[CODE]function meta:IsCP()
local Team = self:Team()
return Team == TEAM_POLICE or Team == TEAM_CHIEF or Team == TEAM_SWAT or Team == TEAM_MAYOR
end[/CODE]
that is for the job swat, but if you had swat and swat sniper you would simply do
[CODE]function meta:IsCP()
local Team = self:Team()
return Team == TEAM_POLICE or Team == TEAM_CHIEF or Team == TEAM_SWAT or Team == TEAM_SWATSNIPER o rTeam == TEAM_MAYOR
end[/CODE]
it all depends on how you programmed your shared.lua with the team/jobs in it.
[QUOTE=Zeneth;31734440]go into your player.lua which is located in your gamemode/darkrp/gamemode. Than hit Ctrl+F (to search) and search TEAM_POLICE
You should get something like this
[CODE]function meta:IsCP()
local Team = self:Team()
return Team == TEAM_POLICE or Team == TEAM_CHIEF or Team == TEAM_MAYOR
end[/CODE]
change that to this
[CODE]function meta:IsCP()
local Team = self:Team()
return Team == TEAM_POLICE or Team == TEAM_CHIEF or Team == TEAM_SWAT or Team == TEAM_MAYOR
end[/CODE]
that is for the job swat, but if you had swat and swat sniper you would simply do
[CODE]function meta:IsCP()
local Team = self:Team()
return Team == TEAM_POLICE or Team == TEAM_CHIEF or Team == TEAM_SWAT or Team == TEAM_SWATSNIPER o rTeam == TEAM_MAYOR
end[/CODE]
it all depends on how you programmed your shared.lua with the team/jobs in it.[/QUOTE]
worked great thank you
Sorry, you need to Log In to post a reply to this thread.