Advertisement
Guest User

groups.lua

a guest
Oct 10th, 2017
324
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 9.03 KB | None | 0 0
  1.  
  2. local cfg = {}
  3.  
  4. -- define each group with a set of permissions
  5. -- _config property:
  6. --- gtype (optional): used to have only one group with the same gtype per player (example: a job gtype to only have one job)
  7. --- onspawn (optional): function(player) (called when the player spawn with the group)
  8. --- onjoin (optional): function(player) (called when the player join the group)
  9. --- onleave (optional): function(player) (called when the player leave the group)
  10. --- (you have direct access to vRP and vRPclient, the tunnel to client, in the config callbacks)
  11.  
  12. cfg.groups = {
  13.   ["superadmin"] = {
  14.     _config = {onspawn = function(player) vRPclient.notify(player,{"You are superadmin."}) end},
  15.     "player.group.add",
  16.     "player.group.remove",
  17.     "player.givemoney",
  18.     "player.giveitem"
  19.   },
  20.   ["admin"] = {
  21.     "admin.tickets",
  22.     "admin.announce",
  23.     "player.list",
  24.     "player.whitelist",
  25.     "player.unwhitelist",
  26.     "player.kick",
  27.     "player.ban",
  28.     "player.unban",
  29.     "player.noclip",
  30.     "player.custom_emote",
  31.     "player.custom_sound",
  32.     "player.display_custom",
  33.     "player.coords",
  34.     "player.tptome",
  35.     "player.tpto",
  36.     "player.group.add",
  37.     "player.group.remove",
  38.     "player.givemoney",
  39.     "player.giveitem"
  40.   },
  41.   -- the group user is auto added to all logged players
  42.   ["user"] = {
  43.     "player.phone",
  44.     "player.calladmin",
  45.     "police.askid",
  46.     "police.store_weapons",
  47.     "police.seizable",  -- can be seized
  48.     "user.paycheck",
  49.     "harvest.weed"
  50.   },
  51.   ["police"] = {
  52.     _config = {
  53.       gtype = "job",
  54.       onjoin = function(player) vRPclient.setCop(player,{true}) end,
  55.       onspawn = function(player) vRPclient.setCop(player,{true}) end,
  56.       onleave = function(player) vRPclient.setCop(player,{false}) end
  57.     },
  58.     "police.cloakroom",
  59.     "police.pc",
  60.     "police.handcuff",
  61.     "police.putinveh",
  62.     "police.getoutveh",
  63.     "police.check",
  64.     "police.service",
  65.     "police.wanted",
  66.     "police.seize.weapons",
  67.     "police.seize.items",
  68.     "police.jail",
  69.     "police.fine",
  70.     "police.announce",
  71.     "-police.store_weapons",
  72.     "-police.seizable", -- negative permission, police can't seize itself, even if another group add the permission
  73.     "police.vehicle",
  74.     "police.loadshop",
  75.     "cop.whitelisted",
  76.     "police.paycheck",
  77.     "emergency.market",
  78.     "emergency.revive"
  79.   },
  80.   ["emergency"] = {
  81.     _config = { gtype = "job",
  82.     onspawn = function(player) vRPclient.notify(player,{"You are doctor, sallary : $1200."}) end
  83.     },
  84.     "emergency.revive",
  85.     "emergency.shop",
  86.     "emergency.service",
  87.     "emergency.cloakroom",
  88.     "emergency.vehicle",
  89.     "emergency.market",
  90.     "ems.whitelisted",
  91.     "emergency.paycheck"
  92.   },
  93.   ["repair"] = {
  94.     _config = { gtype = "job",
  95.     onspawn = function(player) vRPclient.notify(player,{"You are Mechanic, sallary : $900."}) end
  96.     },
  97.     "vehicle.repair",
  98.     "vehicle.replace",
  99.     "repair.service",
  100.     "mission.repair.satellite_dishes",
  101.     "mission.repair.wind_turbines",
  102.     "repair.vehicle",
  103.     "repair.market",
  104.     "repair.paycheck"
  105.   },
  106.   ["taxi"] = {
  107.     _config = { gtype = "job",
  108.     onspawn = function(player) vRPclient.notify(player,{"You are Taxista, sallary : $600."}) end
  109.     },
  110.     "taxi.service",
  111.     "taxi.vehicle",
  112.     "taxi.paycheck"
  113.   },
  114.   ["citizen"] = {
  115.     _config = { gtype = "job",
  116.     onspawn = function(player) vRPclient.notify(player,{"You are Unemployed, go to Department of jobs."}) end
  117.     }
  118.   },
  119.   ["delivery"] = {
  120.     _config = { gtype = "job",
  121.     onspawn = function(player) vRPclient.notify(player,{"You are Delivery, Sallary : $500."}) end
  122.     },
  123.     "mission.delivery.food",
  124.     "delivery.vehicle",
  125.     "delivery.paycheck"
  126.   },
  127.   ["president"] = {
  128.     _config = { gtype = "job",
  129.     onspawn = function(player) vRPclient.notify(player,{"You are President, Sallary : $10000."}) end
  130.     },
  131.     "player.group.add",
  132.     "player.group.remove",
  133.     "player.list",
  134.     "president.vehicle",
  135.     "president.whitelisted",
  136.     "president.cloakroom",
  137.     "player.kick",
  138.     "president.paycheck"
  139.   },
  140.   ["drugseller"] = {
  141.     _config = { gtype = "job",
  142.     onspawn = function(player) vRPclient.notify(player,{"You are DrugSeller."}) end
  143.     },
  144.     "mission.drugseller.weed",
  145.     "drugseller.market",
  146.     "harvest.weed"
  147.   },
  148.   ["hacker"] = {
  149.     _config = { gtype = "job",
  150.     onspawn = function(player) vRPclient.notify(player,{"You are Hacker."}) end
  151.     },
  152.     "mission.hacker.information",
  153.     "hacker.credit_cards"
  154.   },
  155.   ["bankdriver"] = {
  156.     _config = { gtype = "job",
  157.     onspawn = function(player) vRPclient.notify(player,{"You are Bank Driver."}) end
  158.     },
  159.     "mission.bankdriver.moneybank",
  160.     "mission.bankdriver.moneybank2",
  161.     "bankdriver.vehicle",
  162.     "bankdriver.paycheck",
  163.     "bankdriver.money"
  164.   },
  165.   ["fbi"] = {
  166.     _config = { gtype = "job",
  167.       onjoin = function(player) vRPclient.setCop(player,{true}) end,
  168.       onspawn = function(player) vRPclient.setCop(player,{true}) end,
  169.       onleave = function(player) vRPclient.setCop(player,{false}) end
  170.     },
  171.     "fbi.cloakroom",
  172.     "police.pc",
  173.     "police.handcuff",
  174.     "police.putinveh",
  175.     "police.getoutveh",
  176.     "police.check",
  177.     "police.service",
  178.     "police.wanted",
  179.     "police.seize.weapons",
  180.     "police.seize.items",
  181.     "police.jail",
  182.     "police.fine",
  183.     "police.announce",
  184.     "-police.store_weapons",
  185.     "-police.seizable", -- negative permission, police can't seize itself, even if another group add the permission
  186.     "police.vehicle",
  187.     "police.loadshop",
  188.     "cop.whitelisted",
  189.     "fbi.paycheck"
  190.   },
  191.   ["sheriff"] = {
  192.     _config = { gtype = "job",
  193.       onjoin = function(player) vRPclient.setCop(player,{true}) end,
  194.       onspawn = function(player) vRPclient.setCop(player,{true}) end,
  195.       onleave = function(player) vRPclient.setCop(player,{false}) end
  196.     },
  197.     "sheriff.cloakroom",
  198.     "police.pc",
  199.     "police.handcuff",
  200.     "police.putinveh",
  201.     "police.getoutveh",
  202.     "police.check",
  203.     "police.service",
  204.     "police.wanted",
  205.     "police.seize.weapons",
  206.     "police.seize.items",
  207.     "police.jail",
  208.     "police.fine",
  209.     "police.announce",
  210.     "-police.store_weapons",
  211.     "-police.seizable", -- negative permission, police can't seize itself, even if another group add the permission
  212.     "police.vehicle",
  213.     "police.loadshop",
  214.     "cop.whitelisted",
  215.     "sheriff.paycheck"
  216.   },
  217.   ["trafficguard"] = {
  218.     _config = { gtype = "job",
  219.       onjoin = function(player) vRPclient.setCop(player,{true}) end,
  220.       onspawn = function(player) vRPclient.setCop(player,{true}) end,
  221.       onleave = function(player) vRPclient.setCop(player,{false}) end
  222.     },
  223.     --"drugseller.market",
  224.     "police.cloakroom",
  225.     "police.pc",
  226.     "police.handcuff",
  227.     "police.putinveh",
  228.     "police.getoutveh",
  229.     "police.check",
  230.     "police.service",
  231.     "police.wanted",
  232.     "police.seize.weapons",
  233.     "police.seize.items",
  234.     "police.jail",
  235.     "police.fine",
  236.     "police.announce",
  237.     "-police.store_weapons",
  238.     "-police.seizable", -- negative permission, police can't seize itself, even if another group add the permission
  239.     "police.vehicle",
  240.     "police.loadshop",
  241.     "cop.whitelisted",
  242.     "trafficguard.paycheck"
  243.   },
  244.   -- whitelist group for police, emergency and president jobs / add player to this group and user can view the job selection / search in the map
  245.   -- moderator=president / president is guy from the server give a player group cop ems moderator when admin is offline / sallary : $10.000
  246.   ["cop"] = {
  247.     "cop.whitelisted"
  248.   },
  249.   ["ems"] = {  
  250.     "ems.whitelisted"
  251.   },
  252.   ["moderator"] = {
  253.     "president.whitelisted"
  254.   }
  255. }
  256.  
  257. -- groups are added dynamically using the API or the menu, but you can add group when an user join here
  258. cfg.users = {
  259.   [1] = { -- give superadmin and admin group to the first created user on the database
  260.     "superadmin",
  261.     "admin"
  262.   }
  263. }
  264.  
  265. -- group selectors
  266. -- _config
  267. --- x,y,z, blipid, blipcolor, permissions (optional)
  268.  
  269. cfg.selectors = {
  270.   ["Job Selector"] = {
  271.     _config = {x = -268.363739013672, y = -957.255126953125, z = 31.22313880920410, blipid = 351, blipcolor = 47},
  272.     "Taxifahrer",
  273.     "Mechaniker",
  274.     "Essenslieferant",
  275.     "Geldtransportfahrer",
  276.     "Zivilist"
  277.   },
  278.   ["Police Job"] = {
  279.     _config = {x = 441.203308105469, y = -981.135131835938, z = 30.6896057128906, blipid = 351, blipcolor = 1, permissions = {"cop.whitelisted"} },
  280.     "police",
  281.     "fbi",
  282.     "sheriff",
  283.     "trafficguard",
  284.     "citizen"
  285.   },
  286.   ["Emergency job"] = {
  287.     _config = {x = 362.950988769531, y = -582.060119628906, z = 28.8373031616211, blipid = 351, blipcolor = 3, permissions = {"ems.whitelisted"} },
  288.     "emergency",
  289.     "citizen"
  290.   },
  291.   ["President job"] = {
  292.     _config = {x = 109.550834655762, y = -1090.01123046875, z = 29.3024768829346, blipid = 351, blipcolor = 7, permissions = {"president.whitelisted"} },
  293.     "president",
  294.     "citizen"
  295.   },
  296.   ["Drugseller job"] = {
  297.     _config = {x = -1221.61193847656, y = -1327.22326660156, z = 4.38175058364868, blipid = 277, blipcolor = 4},
  298.     "drugseller",
  299.     "citizen"
  300.   },
  301.   ["Hacker job"] = {
  302.     _config = {x = 705.682189941406, y = -966.919067382813, z = 30.3953418731689, blipid = 521, blipcolor = 4},
  303.     "hacker",
  304.     "citizen"
  305.   }
  306.  
  307. }
  308.  
  309. return cfg
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement