Advertisement
Guest User

shared.lua

a guest
Aug 9th, 2013
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 15.68 KB | None | 0 0
  1. /*--------------------------------------------------------
  2. Default teams. If you make a team above the citizen team, people will spawn with that team!
  3. --------------------------------------------------------*/
  4. TEAM_CITIZEN = AddExtraTeam("Citizen", {
  5.     color = Color(20, 150, 20, 255),
  6.     model = {
  7.         "models/player/Group01/Female_01.mdl",
  8.         "models/player/Group01/Female_02.mdl",
  9.         "models/player/Group01/Female_03.mdl",
  10.         "models/player/Group01/Female_04.mdl",
  11.         "models/player/Group01/Female_06.mdl",
  12.         "models/player/group01/male_01.mdl",
  13.         "models/player/Group01/Male_02.mdl",
  14.         "models/player/Group01/male_03.mdl",
  15.         "models/player/Group01/Male_04.mdl",
  16.         "models/player/Group01/Male_05.mdl",
  17.         "models/player/Group01/Male_06.mdl",
  18.         "models/player/Group01/Male_07.mdl",
  19.         "models/player/Group01/Male_08.mdl",
  20.         "models/player/Group01/Male_09.mdl"
  21.     },
  22.     description = [[The Citizen is the most basic level of society you can hold
  23.         besides being a hobo.
  24.         You have no specific role in city life.]],
  25.     weapons = {},
  26.     command = "citizen",
  27.     max = 0,
  28.     salary = 45,
  29.     admin = 0,
  30.     vote = false,
  31.     hasLicense = false,
  32.     candemote = false,
  33.     mayorCanSetSalary = true
  34. })
  35.  
  36. TEAM_POLICE = AddExtraTeam("Civil Protection", {
  37.     color = Color(25, 25, 170, 255),
  38.     model = {"models/player/police.mdl", "models/player/police_fem.mdl"},
  39.     description = [[The protector of every citizen that lives in the city .
  40.         You have the power to arrest criminals and protect innocents.
  41.         Hit them with your arrest baton to put them in jail
  42.         Bash them with a stunstick and they might learn better than to disobey
  43.         the law.
  44.         The Battering Ram can break down the door of a criminal with a warrant
  45.         for his/her arrest.
  46.         The Battering Ram can also unfreeze frozen props(if enabled).
  47.         Type /wanted <name> to alert the public to this criminal
  48.         OR go to tab and warrant someone by clicking the warrant button]],
  49.     weapons = {"arrest_stick", "unarrest_stick", "weapon_glock2", "stunstick", "door_ram", "weaponchecker"},
  50.     command = "cp",
  51.     max = 4,
  52.     salary = 65,
  53.     admin = 0,
  54.     vote = true,
  55.     hasLicense = true,
  56.     help = {
  57.         "Please don't abuse your job",
  58.         "When you arrest someone they are auto transported to jail.",
  59.         "They are auto let out of jail after some time",
  60.         "Type /warrant [Nick|SteamID|Status ID] to set a search warrant for a player.",
  61.         "Type /wanted [Nick|SteamID|Status ID] to alert everyone to a wanted suspect",
  62.         "Type /unwanted [Nick|SteamID|Status ID] to clear the suspect",
  63.         "Type /jailpos to set the jail position"
  64.     }
  65. })
  66.  
  67. TEAM_GANG = AddExtraTeam("Gangster", {
  68.     color = Color(75, 75, 75, 255),
  69.     model = {
  70.         "models/player/Group03/Female_01.mdl",
  71.         "models/player/Group03/Female_02.mdl",
  72.         "models/player/Group03/Female_03.mdl",
  73.         "models/player/Group03/Female_04.mdl",
  74.         "models/player/Group03/Female_06.mdl",
  75.         "models/player/group03/male_01.mdl",
  76.         "models/player/Group03/Male_02.mdl",
  77.         "models/player/Group03/male_03.mdl",
  78.         "models/player/Group03/Male_04.mdl",
  79.         "models/player/Group03/Male_05.mdl",
  80.         "models/player/Group03/Male_06.mdl",
  81.         "models/player/Group03/Male_07.mdl",
  82.         "models/player/Group03/Male_08.mdl",
  83.         "models/player/Group03/Male_09.mdl"},
  84.     description = [[The lowest person of crime.
  85.         A gangster generally works for the Mobboss who runs a crime family.
  86.         The Mobboss sets your agenda and you follow it or you might be punished.]],
  87.     weapons = {},
  88.     command = "gangster",
  89.     max = 7,
  90.     salary = 45,
  91.     admin = 0,
  92.     vote = false,
  93.     hasLicense = false,
  94.     mayorCanSetSalary = false
  95. })
  96.  
  97. TEAM_MOB = AddExtraTeam("Gang Leader", {
  98.     color = Color(25, 25, 25, 255),
  99.     model = "models/player/gman_high.mdl",
  100.     description = [[The Mobboss is the boss of the criminals in the city.
  101.         With his power he coordinates the gangsters and forms an efficient crime
  102.         organization.
  103.         He has the ability to break into houses by using a lockpick.
  104.         The Mobboss also can unarrest you.]],
  105.     weapons = {"lockpick", "unarrest_stick"},
  106.     command = "mobboss",
  107.     max = 1,
  108.     salary = 60,
  109.     admin = 0,
  110.     vote = false,
  111.     hasLicense = false,
  112.     mayorCanSetSalary = false,
  113.     help = {
  114.         "As the mob boss, you decide what you want the other Gangsters to do.",
  115.         "You get an Unarrest Stick which you can use to break people out of jail.",
  116.         "/agenda <Message> Sets the Gangsters' agenda. Use // to go to the next line."
  117.     }
  118. })
  119.  
  120. TEAM_GUN = AddExtraTeam("Gun Dealer", {
  121.     color = Color(255, 140, 0, 255),
  122.     model = "models/player/monk.mdl",
  123.     description = [[A gun dealer is the only person who can sell guns to other
  124.         people.
  125.         However, make sure you aren't caught selling guns that are illegal to
  126.         the public.
  127.         /Buyshipment <name> to Buy a  weapon shipment
  128.         /Buygunlab to Buy a gunlab that spawns P228 pistols]],
  129.     weapons = {},
  130.     command = "gundealer",
  131.     max = 2,
  132.     salary = 45,
  133.     admin = 0,
  134.     vote = false,
  135.     hasLicense = false,
  136.     mayorCanSetSalary = true
  137. })
  138.  
  139. TEAM_MEDIC = AddExtraTeam("Medic", {
  140.     color = Color(47, 79, 79, 255),
  141.     model = "models/player/kleiner.mdl",
  142.     description = [[With your medical knowledge,
  143.         you heal players to proper
  144.         health.
  145.         Without a medic, people cannot be healed.
  146.         Left click with the Medical Kit to heal other players.
  147.         Right click with the Medical Kit to heal yourself.]],
  148.     weapons = {"med_kit"},
  149.     command = "medic",
  150.     max = 3,
  151.     salary = 45,
  152.     admin = 0,
  153.     vote = false,
  154.     hasLicense = false,
  155.     medic = true,
  156.     mayorCanSetSalary = true
  157. })
  158.  
  159. TEAM_CHIEF = AddExtraTeam("Civil Protection Chief", {
  160.     color = Color(20, 20, 255, 255),
  161.     model = "models/player/combine_soldier_prisonguard.mdl",
  162.     description = [[The Chief is the leader of the Civil Protection unit.
  163.         Coordinate the police force to enforce law in the city.
  164.         Hit them with arrest baton to put them in jail.
  165.         Bash them with a stunstick and they might learn better than to
  166.         disobey the law.
  167.         The Battering Ram can break down the door of a criminal with a
  168.         warrant for his/her arrest.
  169.         Type /wanted <name> to alert the public to this criminal
  170.         Type /jailpos to set the Jail Position]],
  171.     weapons = {"arrest_stick", "unarrest_stick", "weapon_deagle2", "stunstick", "door_ram", "weaponchecker"},
  172.     command = "chief",
  173.     max = 1,
  174.     salary = 75,
  175.     admin = 0,
  176.     vote = false,
  177.     hasLicense = true,
  178.     chief = true,
  179.     NeedToChangeFrom = TEAM_POLICE, TEAM_POLICEMEDIC
  180.     help = {
  181.         "Please don't abuse your job",
  182.         "When you arrest someone they are auto transported to jail.",
  183.         "They are auto let out of jail after some time",
  184.         "Type /warrant [Nick|SteamID|Status ID] to set a search warrant for a player.",
  185.         "Type /wanted [Nick|SteamID|Status ID] to alert everyone to a wanted suspect",
  186.         "Type /unwanted [Nick|SteamID|Status ID] to clear the suspect",
  187.         "Type /jailpos to set the jail position"
  188.     }
  189. })
  190.  
  191. TEAM_MAYOR = AddExtraTeam("Mayor", {
  192.     color = Color(150, 20, 20, 255),
  193.     model = "models/player/breen.mdl",
  194.     description = [[The Mayor of the city creates laws to serve the greater good
  195.     of the people.
  196.     If you are the mayor you may create and accept warrants.
  197.     Type /wanted <name>  to warrant a player
  198.     Type /jailpos to set the Jail Position
  199.     Type /lockdown initiate a lockdown of the city.
  200.     Everyone must be inside during a lockdown.
  201.     The cops patrol the area
  202.     /unlockdown to end a lockdown]],
  203.     weapons = {},
  204.     command = "mayor",
  205.     max = 1,
  206.     salary = 85,
  207.     admin = 0,
  208.     vote = true,
  209.     hasLicense = false,
  210.     mayor = true,
  211.     help = {
  212.         "Type /warrant [Nick|SteamID|Status ID] to set a search warrant for a player.",
  213.         "Type /wanted [Nick|SteamID|Status ID] to alert everyone to a wanted suspect.",
  214.         "Type /unwanted [Nick|SteamID|Status ID] to clear the suspect.",
  215.         "Type /lockdown to initiate a lockdown",
  216.         "Type /unlockdown to end a lockdown",
  217.         "Type /placelaws to place a screen containing the laws.",
  218.         "Type /addlaw and /removelaw to edit the laws."
  219.        
  220.     }
  221. })
  222.  
  223. TEAM_HOBO = AddExtraTeam("Hobo", {
  224.     color = Color(80, 45, 0, 255),
  225.     model = "models/player/corpse1.mdl",
  226.     description = [[The lowest member of society. All people see you laugh.
  227.         You have no home.
  228.         Beg for your food and money
  229.         Sing for everyone who passes to get money
  230.         Make your own wooden home somewhere in a corner or
  231.         outside someone else's door]],
  232.     weapons = {"weapon_bugbait"},
  233.     command = "hobo",
  234.     max = 5,
  235.     salary = 0,
  236.     admin = 0,
  237.     vote = false,
  238.     hasLicense = false,
  239.     candemote = false,
  240.     hobo = true,
  241.     mayorCanSetSalary = false
  242. })
  243.  
  244. //ADD CUSTOM TEAMS UNDER THIS LINE:
  245.  
  246. TEAM_POLICEMEDIC = AddExtraTeam("Civil Protection Medic", {
  247.     color = Color(25, 25, 1225, 255),
  248.     model = {"models/player/police.mdl", "models/player/police_fem.mdl"},
  249.     description = [[The protector of every citizen that lives in the city .
  250.         You have the power to arrest criminals and protect innocents.
  251.         Hit them with your arrest baton to put them in jail
  252.         Bash them with a stunstick and they might learn better than to disobey
  253.         the law.
  254.         As a CP Medic you have the power to heal your fellow CP's durring a shoot
  255.         out, or simply heal citizens that are in need of aid.
  256.         The Battering Ram can break down the door of a criminal with a warrant
  257.         for his/her arrest.
  258.         The Battering Ram can also unfreeze frozen props(if enabled).
  259.         Type /wanted <name> to alert the public to this criminal
  260.         OR go to tab and warrant someone by clicking the warrant button]],
  261.     weapons = {"med_kit", "arrest_stick", "unarrest_stick", "weapon_glock2", "stunstick", "door_ram", "weaponchecker"},
  262.     command = "cpmedic",
  263.     max = 2,
  264.     salary = 65,
  265.     admin = 0,
  266.     vote = true,
  267.     hasLicense = true,
  268.     help = {
  269.         "Please don't abuse your job",
  270.         "When you arrest someone they are auto transported to jail.",
  271.         "They are auto let out of jail after some time",
  272.         "Type /warrant [Nick|SteamID|Status ID] to set a search warrant for a player.",
  273.         "Type /wanted [Nick|SteamID|Status ID] to alert everyone to a wanted suspect",
  274.         "Type /unwanted [Nick|SteamID|Status ID] to clear the suspect",
  275.         "Type /jailpos to set the jail position"
  276.     }
  277. })
  278.  
  279. TEAM_GUARD = AddExtraTeam("Guard", {
  280.     color = Color(0, 0, 204, 255),
  281.     model = "models/player/odessa.mdl",
  282.     description = [[The Guard is hired by anybody for any needs. Such as defending
  283.         a building full of money printers, or just protecting a gun shop.]],
  284.     weapons = {"stunstick", "weaponchecker"},
  285.     command = "guard",
  286.     max = 5,
  287.     salary = 45,
  288.     admin = 0,
  289.     vote = false,
  290.     hasLicense = false,
  291. })
  292.  
  293. TEAM_THIEF = AddExtraTeam("Thief", {
  294.     color = Color(0, 0, 204, 255),
  295.     model = "models/player/t_guerilla.mdl",
  296.     description = [[The Thief starts with a lockpick. Use this to break into
  297.         peoples homes, team up with a Hacker and raid any base.]],
  298.     weapons = {"lockpick"},
  299.     command = "thief",
  300.     max = 3,
  301.     salary = 40,
  302.     admin = 0,
  303.     vote = false,
  304.     hasLicense = false,
  305. })
  306.  
  307. TEAM_HACKER = AddExtraTeam("Hacker", {
  308.     color = Color(0, 0, 204, 255),
  309.     model = "models/Characters/hostage_04.mdl",
  310.     description = [[The Hacker starts with a keypad cracker. Use this to break
  311.         into peoples homes, team up with a Theif and raid any base.]],
  312.     weapons = {""},
  313.     command = "hacker",
  314.     max = 3,
  315.     salary = 40,
  316.     admin = 0,
  317.     vote = false,
  318.     hasLicense = false,
  319. })
  320.  
  321. TEAM_GODFATHER = AddExtraTeam("God Father", {
  322.     color = Color(255, 255, 255, 255),
  323.     model = "models/player/magnusson.mdl",
  324.     description = [[The God Father is the boss of the Mafia in the city.
  325.         With his power he coordinates the Mafia Members and forms an
  326.         efficient crime organization.
  327.         He has the ability to break into houses by using a lockpick.
  328.         The Mobboss also can unarrest you.]],
  329.     weapons = {"lockpick", "unarrest_stick"},
  330.     command = "godfather",
  331.     max = 1,
  332.     salary = 60,
  333.     admin = 0,
  334.     vote = false,
  335.     hasLicense = false,
  336.     mayorCanSetSalary = false,
  337.     help = {
  338.         "As the god father, you decide what you want the other Mafia to do.",
  339.         "You get an Unarrest Stick which you can use to break people out of jail.",
  340.         "/agenda <Message> Sets the Mafia's agenda. Use // to go to the next line."
  341.     }
  342. })
  343.  
  344. TEAM_MAFIA = AddExtraTeam("Mafia", {
  345.     color = Color(240, 240, 240, 255),
  346.     model = {
  347.         "models\Humans/Group02/male_02.mdl",
  348.         "models\Humans/Group02/Male_04.mdl",
  349.         "models\Humans/Group02/male_06.mdl",
  350.         "models\Humans/Group02/male_08.mdl"},
  351.     description = [[The lowest person of crime.
  352.         A Mafia generally works for the God Father who runs a crime family.
  353.         The God Father sets your agenda and you follow it or you might be punished.]],
  354.     weapons = {},
  355.     command = "Mafia",
  356.     max = 7,
  357.     salary = 45,
  358.     admin = 0,
  359.     vote = false,
  360.     hasLicense = false,
  361.     mayorCanSetSalary = false
  362. })
  363.  
  364. TEAM_ADMIN = AddExtraTeam("Admin on Duty", {
  365.     color = Color(191, 0, 255, 255),
  366.     model = "models/Combine_Super_Soldier.mdl",
  367.     description = [[Admin on Duty, Admin only class.]],
  368.     weapons = {"lockpick"},
  369.     command = "adminonduty",
  370.     max = 50,
  371.     salary = 69,
  372.     admin = 1,
  373.     vote = false,
  374.     hasLicense = false,
  375.     mayorCanSetSalary = false,
  376. })
  377.  
  378. TEAM_SUPERADMIN = AddExtraTeam("Superadmin on Duty", {
  379.     color = Color(191, 0, 255, 255),
  380.     model = "models/Combine_Super_Soldier.mdl",
  381.     description = [[Admin on Duty, Admin only class.]],
  382.     weapons = {"lockpick"},
  383.     command = "superadminonduty",
  384.     max = 50,
  385.     salary = 69,
  386.     admin = 1,
  387.     vote = false,
  388.     hasLicense = false,
  389.     mayorCanSetSalary = false,
  390. })
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400. /*
  401. --------------------------------------------------------
  402. HOW TO MAKE A DOOR GROUP
  403. --------------------------------------------------------
  404. AddDoorGroup("NAME OF THE GROUP HERE, you see this when looking at a door", Team1, Team2, team3, team4, etc.)
  405.  
  406. WARNING: THE DOOR GROUPS HAVE TO BE UNDER THE TEAMS IN SHARED.LUA. IF THEY ARE NOT, IT MIGHT MUCK UP!
  407.  
  408.  
  409. The default door groups, can also be used as examples:
  410. */
  411. AddDoorGroup("Cops and Mayor only", TEAM_CHIEF, TEAM_POLICE, TEAM_MAYOR, TEAM_POLICEMEDIC)
  412. AddDoorGroup("Gundealer only", TEAM_GUN)
  413.  
  414.  
  415. /*
  416. --------------------------------------------------------
  417. HOW TO MAKE AN AGENDA
  418. --------------------------------------------------------
  419. AddAgenda(Title of the agenda, Manager (who edits it), Listeners (the ones who just see and follow the agenda))
  420.  
  421. WARNING: THE AGENDAS HAVE TO BE UNDER THE TEAMS IN SHARED.LUA. IF THEY ARE NOT, IT MIGHT MUCK UP!
  422.  
  423. The default agenda's, can also be used as examples:
  424. */
  425. AddAgenda("Gangster's agenda", TEAM_MOB, {TEAM_GANG})
  426. AddAgenda("Mafia's agenda", TEAM_GODFATHER, {TEAM_MAFIA})
  427. AddAgenda("Police agenda", TEAM_MAYOR, {TEAM_CHIEF, TEAM_POLICE, TEAM_POLICEMEDIC})
  428.  
  429.  
  430. /*
  431. ---------------------------------------------------------------------------
  432. HOW TO MAKE A GROUP CHAT
  433. ---------------------------------------------------------------------------
  434. Pick one!
  435. GAMEMODE:AddGroupChat(List of team variables separated by comma)
  436.  
  437. or
  438.  
  439. GAMEMODE:AddGroupChat(a function with ply as argument that returns whether a random player is in one chat group)
  440. This one is for people who know how to script Lua.
  441.  
  442. */
  443. GM:AddGroupChat(function(ply) return ply:IsCP() end)
  444. GM:AddGroupChat(TEAM_MOB, TEAM_GANG)
  445. GM:AddGroupChat(TEAM_MAFIA, TEAM_GODFATHER)
  446.  
  447. /*---------------------------------------------------------------------------
  448. Define which team joining players spawn into and what team you change to if demoted
  449. ---------------------------------------------------------------------------*/
  450. GM.DefaultTeam = TEAM_CITIZEN
  451.  
  452. /*---------------------------------------------------------------------------
  453. Define which teams belong to civil protection
  454. Civil protection can set warrants, make people wanted and do some other police related things
  455. ---------------------------------------------------------------------------*/
  456. GM.CivilProtection = {
  457.     [TEAM_POLICE] = true,
  458.     [TEAM_CHIEF] = true,
  459.     [TEAM_MAYOR] = true,
  460.     [TEAM_POLICEMEDIC] = true
  461. }
  462.  
  463. /*---------------------------------------------------------------------------
  464. Enable hitman goodies on this team
  465. ---------------------------------------------------------------------------*/
  466. DarkRP.addHitmanTeam(TEAM_MOB)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement