Advertisement
Guest User

Untitled

a guest
Feb 26th, 2016
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.39 KB | None | 0 0
  1. -- People often copy jobs. When they do, the GM table does not exist anymore.
  2. -- This line makes the job code work both inside and outside of gamemode files.
  3. -- You should not copy this line into your code.
  4. local GAMEMODE = GAMEMODE or GM
  5. /*--------------------------------------------------------
  6. Default teams. Please do not edit this file. Please use the darkrpmod addon instead.
  7. --------------------------------------------------------*/
  8. TEAM_SS = DarkRP.createJob("Sewer Mutant", {
  9. color = Color(100, 20, 20, 230),
  10. model = "models/player/zombie_fast.mdl",
  11. description = [[You live underground and kill anyone who comes underground, people will kill you if they see you on the surface!]],
  12. weapons = {"weapon_crowbar", "weapon_camo"},
  13. command = "mutant",
  14. max = 5,
  15. salary = 0,
  16. admin = 0,
  17. PlayerLoadout = function(ply) -- this line is added. Remember a comma at the end of above line if it is not there.
  18. ply:SetHealth(200)
  19. ply:SetArmor(0)
  20. ply:SetWalkSpeed(200)
  21. ply:SetRunSpeed(350)
  22. end,
  23. vote = false,
  24. hasLicense = false,
  25. ammo = {
  26. ["pistol"] = 60,
  27. },
  28. category = "Citizens",
  29. })
  30.  
  31. TEAM_ADMIN = DarkRP.createJob("Admin On Duty", {
  32. color = Color(170, 0, 0, 255),
  33. model = "models/player/combine_super_soldier.mdl",
  34. description = [[Admin on duty is when you as an admin, is ready to make sure the server stays at its best.
  35. It's up to you to patrol and respond to admin calls. Failure to do so as this Job may result in a demotion.]],
  36. weapons = {},
  37. command = "aod",
  38. max = 3,
  39. salary = 1000,
  40. admin = 1,
  41. vote = false,
  42. hasLicense = false,
  43. customCheck = function(ply) return ply:GetUserGroup() == "Admin" end,
  44.  
  45. })
  46.  
  47. TEAM_THIEF = DarkRP.createJob("Thief", {
  48. color = Color(0, 0, 0, 255),
  49. model = "models/player/robber.mdl",
  50. description = [[You are a thief, rob people, lockpick their house and steal their plants and legal printers.]],
  51. weapons = {"lockpick", "keypad_cracker"}, -- You may wanna find a pickpocket swep and add it here.
  52. command = "thief",
  53. max = 4,
  54. salary = 40,
  55. admin = 0,
  56. vote = false,
  57. hasLicense = false,
  58. category = "Citizens",
  59. })
  60.  
  61. TEAM_CITIZEN = DarkRP.createJob("Citizen", {
  62. color = Color(20, 150, 20, 255),
  63. model = {
  64. "models/player/Group01/Female_01.mdl",
  65. "models/player/Group01/Female_02.mdl",
  66. "models/player/Group01/Female_03.mdl",
  67. "models/player/Group01/Female_04.mdl",
  68. "models/player/Group01/Female_06.mdl",
  69. "models/player/group01/male_01.mdl",
  70. "models/player/Group01/Male_02.mdl",
  71. "models/player/Group01/male_03.mdl",
  72. "models/player/Group01/Male_04.mdl",
  73. "models/player/Group01/Male_05.mdl",
  74. "models/player/Group01/Male_06.mdl",
  75. "models/player/Group01/Male_07.mdl",
  76. "models/player/Group01/Male_08.mdl",
  77. "models/player/Group01/Male_09.mdl"
  78. },
  79. description = [[The Citizen is the most basic level of society you can hold besides being a hobo. You have no specific role in city life.]],
  80. weapons = {},
  81. command = "citizen",
  82. max = 0,
  83. salary = GAMEMODE.Config.normalsalary,
  84. admin = 0,
  85. vote = false,
  86. hasLicense = false,
  87. candemote = false,
  88. category = "Citizens",
  89. })
  90.  
  91. TEAM_POLICE = DarkRP.createJob("Civil Protection", {
  92. color = Color(25, 25, 170, 255),
  93. model = {"models/player/police.mdl", "models/player/police_fem.mdl"},
  94. description = [[The protector of every citizen that lives in the city.
  95. You have the power to arrest criminals and protect innocents.
  96. Hit a player with your arrest baton to put them in jail.
  97. Bash a player with a stunstick and they may learn to obey the law.
  98. The Battering Ram can break down the door of a criminal, with a warrant for their arrest.
  99. The Battering Ram can also unfreeze frozen props (if enabled).
  100. Type /wanted <name> to alert the public to the presence of a criminal.]],
  101. weapons = {"arrest_stick", "unarrest_stick", "m9k_usp", "stunstick", "door_ram", "weaponchecker"},
  102. command = "cp",
  103. max = 7,
  104. salary = GAMEMODE.Config.normalsalary * 1.45,
  105. admin = 0,
  106. vote = true,
  107. hasLicense = true,
  108. ammo = {
  109. ["pistol"] = 60,
  110. },
  111. category = "Civil Protection",
  112. })
  113.  
  114. TEAM_GANG = DarkRP.createJob("Gangster", {
  115. color = Color(75, 75, 75, 255),
  116. model = {
  117. "models/player/Group03/Female_01.mdl",
  118. "models/player/Group03/Female_02.mdl",
  119. "models/player/Group03/Female_03.mdl",
  120. "models/player/Group03/Female_04.mdl",
  121. "models/player/Group03/Female_06.mdl",
  122. "models/player/group03/male_01.mdl",
  123. "models/player/Group03/Male_02.mdl",
  124. "models/player/Group03/male_03.mdl",
  125. "models/player/Group03/Male_04.mdl",
  126. "models/player/Group03/Male_05.mdl",
  127. "models/player/Group03/Male_06.mdl",
  128. "models/player/Group03/Male_07.mdl",
  129. "models/player/Group03/Male_08.mdl",
  130. "models/player/Group03/Male_09.mdl"},
  131. description = [[The lowest person of crime.
  132. A gangster generally works for the Mobboss who runs the crime family.
  133. The Mob boss sets your agenda and you follow it or you might be punished.]],
  134. weapons = {"lockpick"},
  135. command = "gangster",
  136. max = 3,
  137. salary = GAMEMODE.Config.normalsalary,
  138. admin = 0,
  139. vote = false,
  140. hasLicense = false,
  141. category = "Gangsters",
  142. })
  143.  
  144. TEAM_MOB = DarkRP.createJob("Mob boss", {
  145. color = Color(25, 25, 25, 255),
  146. model = "models/player/gman_high.mdl",
  147. description = [[The Mob boss is the boss of the criminals in the city.
  148. With his power he coordinates the gangsters and forms an efficient crime organization.
  149. He has the ability to break into houses by using a lockpick.
  150. The Mob boss posesses the ability to unarrest you.]],
  151. weapons = {"lockpick", "unarrest_stick", "keypad_cracker", "m9k_coltpython"}
  152. command = "mobboss",
  153. max = 1,
  154. salary = GAMEMODE.Config.normalsalary * 1.34,
  155. admin = 0,
  156. vote = false,
  157. hasLicense = false,
  158. category = "Gangsters",
  159. })
  160.  
  161. TEAM_GUN = DarkRP.createJob("Gun Dealer", {
  162. color = Color(255, 140, 0, 255),
  163. model = "models/player/monk.mdl",
  164. description = [[A Gun Dealer is the only person who can sell guns to other people.
  165. Make sure you aren't caught selling illegal firearms to the public! You might get arrested!]],
  166. weapons = {},
  167. command = "gundealer",
  168. max = 2,
  169. salary = GAMEMODE.Config.normalsalary,
  170. admin = 0,
  171. vote = false,
  172. hasLicense = false,
  173. category = "Citizens",
  174. })
  175.  
  176. TEAM_MEDIC = DarkRP.createJob("Medic", {
  177. color = Color(47, 79, 79, 255),
  178. model = "models/player/kleiner.mdl",
  179. description = [[With your medical knowledge you work to restore players to full health.
  180. Without a medic, people cannot be healed.
  181. Left click with the Medical Kit to heal other players.
  182. Right click with the Medical Kit to heal yourself.]],
  183. weapons = {"med_kit"},
  184. command = "medic",
  185. max = 3,
  186. salary = GAMEMODE.Config.normalsalary,
  187. admin = 0,
  188. vote = false,
  189. hasLicense = false,
  190. medic = true,
  191. category = "Citizens",
  192. })
  193.  
  194. TEAM_CHIEF = DarkRP.createJob("Civil Protection Chief", {
  195. color = Color(20, 20, 255, 255),
  196. model = "models/player/combine_soldier_prisonguard.mdl",
  197. description = [[The Chief is the leader of the Civil Protection unit.
  198. Coordinate the police force to enforce law in the city.
  199. Hit a player with arrest baton to put them in jail.
  200. Bash a player with a stunstick and they may learn to obey the law.
  201. The Battering Ram can break down the door of a criminal, with a warrant for his/her arrest.
  202. Type /wanted <name> to alert the public to the presence of a criminal.
  203. Type /jailpos to set the Jail Position]],
  204. weapons = {"arrest_stick", "unarrest_stick", "m9k_deagle", "stunstick", "door_ram", "weaponchecker", "m9k_g36"}
  205. command = "chief",
  206. max = 1,
  207. salary = GAMEMODE.Config.normalsalary * 1.67,
  208. admin = 0,
  209. vote = false,
  210. hasLicense = true,
  211. chief = true,
  212. NeedToChangeFrom = TEAM_POLICE,
  213. ammo = {
  214. ["pistol"] = 60,
  215. },
  216. category = "Civil Protection",
  217. })
  218.  
  219. TEAM_MAYOR = DarkRP.createJob("Mayor", {
  220. color = Color(150, 20, 20, 255),
  221. model = "models/player/breen.mdl",
  222. description = [[The Mayor of the city creates laws to govern the city.
  223. If you are the mayor you may create and accept warrants.
  224. Type /wanted <name> to warrant a player.
  225. Type /jailpos to set the Jail Position.
  226. Type /lockdown initiate a lockdown of the city.
  227. Everyone must be inside during a lockdown.
  228. The cops patrol the area.
  229. /unlockdown to end a lockdown]],
  230. weapons = {},
  231. command = "mayor",
  232. max = 1,
  233. salary = GAMEMODE.Config.normalsalary * 1.89,
  234. admin = 0,
  235. vote = true,
  236. hasLicense = false,
  237. mayor = true,
  238. category = "Civil Protection",
  239. })
  240.  
  241. TEAM_HOBO = DarkRP.createJob("Hobo", {
  242. color = Color(80, 45, 0, 255),
  243. model = "models/player/corpse1.mdl",
  244. description = [[The lowest member of society. Everybody laughs at you.
  245. You have no home.
  246. Beg for your food and money
  247. Sing for everyone who passes to get money
  248. Make your own wooden home somewhere in a corner or outside someone else's door]],
  249. weapons = {"weapon_bugbait"},
  250. command = "hobo",
  251. max = 5,
  252. salary = 0,
  253. admin = 0,
  254. vote = false,
  255. hasLicense = false,
  256. candemote = false,
  257. hobo = true,
  258. category = "Citizens",
  259. })
  260.  
  261. if not DarkRP.disabledDefaults["modules"]["hungermod"] then
  262. TEAM_COOK = DarkRP.createJob("Cook", {
  263. color = Color(238, 99, 99, 255),
  264. model = "models/player/mossman.mdl",
  265. description = [[As a cook, it is your responsibility to feed the other members of your city.
  266. You can spawn a microwave and sell the food you make:
  267. /buymicrowave]],
  268. weapons = {},
  269. command = "cook",
  270. max = 2,
  271. salary = 45,
  272. admin = 0,
  273. vote = false,
  274. hasLicense = false,
  275. cook = true
  276. })
  277. end
  278.  
  279. -- Compatibility for when default teams are disabled
  280. TEAM_CITIZEN = TEAM_CITIZEN or -1
  281. TEAM_POLICE = TEAM_POLICE or -1
  282. TEAM_GANG = TEAM_GANG or -1
  283. TEAM_MOB = TEAM_MOB or -1
  284. TEAM_GUN = TEAM_GUN or -1
  285. TEAM_MEDIC = TEAM_MEDIC or -1
  286. TEAM_CHIEF = TEAM_CHIEF or -1
  287. TEAM_MAYOR = TEAM_MAYOR or -1
  288. TEAM_HOBO = TEAM_HOBO or -1
  289.  
  290.  
  291. /*
  292. --------------------------------------------------------
  293. HOW TO MAKE A DOOR GROUP
  294. --------------------------------------------------------
  295. AddDoorGroup("NAME OF THE GROUP HERE, you see this when looking at a door", Team1, Team2, team3, team4, etc.)
  296.  
  297.  
  298. The default door groups, can also be used as examples:
  299. */
  300. AddDoorGroup("Cops and Mayor only", TEAM_CHIEF, TEAM_POLICE, TEAM_MAYOR)
  301. AddDoorGroup("Gundealer only", TEAM_GUN)
  302.  
  303.  
  304. /*
  305. --------------------------------------------------------
  306. HOW TO MAKE AN AGENDA
  307. --------------------------------------------------------
  308. DarkRP.createAgenda(Title of the agenda, Manager (who edits it), Listeners (the ones who just see and follow the agenda))
  309. It's possible to have multiple managers. In that case you have to put all the managers in '{}' (see Police agenda)
  310.  
  311. The default agendas, can also be used as examples:
  312. */
  313. DarkRP.createAgenda("Gangster's agenda", TEAM_MOB, {TEAM_GANG})
  314. DarkRP.createAgenda("Police agenda", {TEAM_MAYOR, TEAM_CHIEF}, {TEAM_POLICE})
  315.  
  316.  
  317. /*
  318. ---------------------------------------------------------------------------
  319. HOW TO MAKE A GROUP CHAT
  320. ---------------------------------------------------------------------------
  321. Pick one!
  322. DarkRP.createGroupChat(List of team variables separated by comma)
  323.  
  324. or
  325.  
  326. DarkRP.createGroupChat(a function with ply as argument that returns whether a random player is in one chat group)
  327. This one is for people who know how to script Lua.
  328.  
  329. */
  330. DarkRP.createGroupChat(function(ply) return ply:isCP() end)
  331. DarkRP.createGroupChat(TEAM_MOB, TEAM_GANG)
  332. DarkRP.createGroupChat(function(listener, ply) return not ply or ply:Team() == listener:Team() end)
  333.  
  334. /*---------------------------------------------------------------------------
  335. Define which team joining players spawn into and what team you change to if demoted
  336. ---------------------------------------------------------------------------*/
  337. GAMEMODE.DefaultTeam = TEAM_CITIZEN
  338.  
  339. /*---------------------------------------------------------------------------
  340. Define which teams belong to civil protection
  341. Civil protection can set warrants, make people wanted and do some other police related things
  342. ---------------------------------------------------------------------------*/
  343. GAMEMODE.CivilProtection = {
  344. [TEAM_POLICE] = true,
  345. [TEAM_CHIEF] = true,
  346. [TEAM_MAYOR] = true,
  347. }
  348.  
  349. /*---------------------------------------------------------------------------
  350. Enable hitman goodies on this team
  351. ---------------------------------------------------------------------------*/
  352. DarkRP.addHitmanTeam(TEAM_MOB)
  353.  
  354. /*---------------------------------------------------------------------------
  355. Default demote groups
  356. ---------------------------------------------------------------------------*/
  357. DarkRP.createDemoteGroup("Cops", {TEAM_POLICE, TEAM_CHIEF})
  358. DarkRP.createDemoteGroup("Gangsters", {TEAM_GANG, TEAM_MOB})
  359.  
  360. /*---------------------------------------------------------------------------
  361. Default categories
  362. ---------------------------------------------------------------------------*/
  363. DarkRP.createCategory{
  364. name = "Citizens",
  365. categorises = "jobs",
  366. startExpanded = true,
  367. color = Color(0, 107, 0, 255),
  368. canSee = fp{fn.Id, true},
  369. sortOrder = 100,
  370. }
  371.  
  372. DarkRP.createCategory{
  373. name = "Civil Protection",
  374. categorises = "jobs",
  375. startExpanded = true,
  376. color = Color(25, 25, 170, 255),
  377. canSee = fp{fn.Id, true},
  378. sortOrder = 101,
  379. }
  380.  
  381. DarkRP.createCategory{
  382. name = "Gangsters",
  383. categorises = "jobs",
  384. startExpanded = true,
  385. color = Color(75, 75, 75, 255),
  386. canSee = fp{fn.Id, true},
  387. sortOrder = 101,
  388. }
  389.  
  390. DarkRP.createCategory{
  391. name = "Other",
  392. categorises = "jobs",
  393. startExpanded = true,
  394. color = Color(0, 107, 0, 255),
  395. canSee = fp{fn.Id, true},
  396. sortOrder = 255,
  397. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement