I can't seem to find out how to make the jobs I have able to warrant, here is what I changed for the jobrelated.lua
[CODE]/*---------------------------------------------------------------------------
Define which teams belong to civil protection
Civil protection can set warrants, make people wanted and do some other police related things
---------------------------------------------------------------------------*/
GAMEMODE.CivilProtection = {
[TEAM_POLICE] = true,
[TEAM_CHIEF] = true,
[TEAM_MAYOR] = true,
[TEAM_MO] = true,
[TEAM_MS] = true,
[TEAM_MSP] = true,
[TEAM_MM] = true,
[TEAM_MB] = true,
[TEAM_SWAT] = true,
[TEAM_SWATS] = true,
[TEAM_SWATC] = true,
}[/CODE]
And this is one of the job codes for example
[CODE]TEAM_MB = DarkRP.createJob("Marine Breacher", {
color = Color(255, 0, 0, 255),
model = {
"models/player/pmc_4/pmc__14.mdl",
"models/player/pmc_2/pmc__14.mdl",
"models/player/pmc_3/pmc__14.mdl",
"models/player/pmc_1/pmc__14.mdl",
"models/player/pmc_5/pmc__14.mdl",
"models/player/pmc_6/pmc__14.mdl"
},
description = [[This is a donator class you can only use this if you are a VIP or others.]],
weapons = {"m9k_ithacam37", "m9k_m29satan", "arrest_stick", "unarrest_stick", "pro_lockpick_update", "keypad_cracker", "door_ram"},
command = "marinebreacher",
max = 1,
salary = 75,
admin = 0,
vote = true,
hasLicense = true,
PlayerSpawn = function( _p ) _p:SetArmor( 100 ); end,
customCheck = function(ply) return CLIENT
or ply:IsUserGroup("VIP")
or ply:IsUserGroup("VIP+")
or ply:IsUserGroup("donator_mod")
or ply:IsUserGroup("tmod_vip")
or ply:IsUserGroup("tmod_vip+")
or ply:IsUserGroup("Head-Admin")
or ply:IsUserGroup("admin_vip")
or ply:IsSuperAdmin()
end
})[/CODE]
I was also wondering how to make it so the owner of an entity can physgun it and how to make it so the jobs such as Marine Breacher cannot arrest other government jobs.
1. Should work
2. [url]http://wiki.garrysmod.com/page/GM/PhysgunPickup[/url]
Check the entity and owner
3. Change the warrant function to return false if the target player is in the CivilProtection table
[QUOTE=code_gs;47608448]1. Should work
2. [url]http://wiki.garrysmod.com/page/GM/PhysgunPickup[/url]
Check the entity and owner
3. Change the warrant function to return false if the target player is in the CivilProtection table[/QUOTE]
What would I edit in the code so it's a job instead of a specific player?
[QUOTE=Exotic Prodig;47613047]What would I edit in the code so it's a job instead of a specific player?[/QUOTE]
Check the player's job with ply:GetTeam()
Sorry, you need to Log In to post a reply to this thread.