Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[---------------------------------------------------------------------------
- Ammo types
- ---------------------------------------------------------------------------
- Ammo boxes that can be purchased in the F4 menu.
- Add your custom ammo types in this file. Here's the syntax:
- DarkRP.createAmmoType("ammoType", {
- name = "Ammo name",
- model = "Model",
- price = 1234,
- amountGiven = 5678,
- customCheck = function(ply) return ply:IsAdmin()
- })
- ammoType: The name of the ammo that Garry's mod recognizes
- If you open your SWEP's shared.lua, you can find the ammo name next to
- SWEP.Primary.Ammo = "AMMO NAME HERE"
- or
- SWEP.Secondary.Ammo = "AMMO NAME HERE"
- name: The name you want to give to the ammo. This can be anything.
- model: The model you want the ammo to have in the F4 menu
- price: the price of your ammo in dollars
- amountGiven: How much bullets of this ammo is given every time the player buys it
- customCheck: (Optional! Advanced!) a Lua function that describes who can buy the ammo.
- Similar to the custom check function for jobs and shipments
- Parameters:
- ply: the player who is trying to buy the ammo
- Examples are below!
- Pistol ammo type. Used by p228, desert eagle and all other pistols
- Example 1:
- DarkRP.createAmmoType("pistol", {
- name = "Pistol ammo",
- model = "models/Items/BoxSRounds.mdl",
- price = 30,
- amountGiven = 24
- })
- Buckshot ammo, used by the shotguns
- Example 2:
- DarkRP.createAmmoType("buckshot", {
- name = "Shotgun ammo",
- model = "models/Items/BoxBuckshot.mdl",
- price = 50,
- amountGiven = 8
- })
- Rifle ammo, usually used by assault rifles
- Example 3:
- DarkRP.createAmmoType("smg1", {
- name = "Rifle ammo",
- model = "models/Items/BoxMRounds.mdl",
- price = 80,
- amountGiven = 30
- })
- Add new ammo types under the next line!
- ---------------------------------------------------------------------------]]
- DarkRP.createAmmoType("fas2_ammo_9x18", {
- name = "9x18 MM Ammo (60 Rounds)",
- model = "models/Items/BoxMRounds.mdl",
- price = 250,
- amountGiven = 60,
- })
- DarkRP.createAmmoType("fas2_ammo_9x19", {
- name = "9x19 MM Ammo (40 Rounds)",
- model = "models/Items/BoxMRounds.mdl",
- price = 250,
- amountGiven = 40,
- })
- DarkRP.createAmmoType("fas2_ammo_10x25", {
- name = "10x25 Ammo (60 Rounds)",
- model = "models/Items/BoxMRounds.mdl",
- price = 250,
- amountGiven = 60,
- })
- DarkRP.createAmmoType("fas2_ammo_12gauge", {
- name = "12 Gauge Ammo (16 Rounds)",
- model = "models/Items/BoxMRounds.mdl",
- price = 250,
- amountGiven = 16,
- })
- DarkRP.createAmmoType("fas2_ammo_23x75", {
- name = "23x75MMR Ammo (20 Rounds)",
- model = "models/Items/BoxMRounds.mdl",
- price = 250,
- amountGiven = 20,
- })
- DarkRP.createAmmoType("fas2_ammo_40mm", {
- name = "40MM HE Ammo (10 Rounds)",
- model = "models/Items/BoxMRounds.mdl",
- price = 250,
- amountGiven = 10,
- })
- DarkRP.createAmmoType("fas2_ammo_44mag", {
- name = ".44 Magnum Ammo (12 Rounds)",
- model = "models/Items/BoxMRounds.mdl",
- price = 250,
- amountGiven = 20,
- })
- DarkRP.createAmmoType("fas2_ammo_45acp", {
- name = ".45 ACP Ammo (30 Rounds)",
- model = "models/Items/BoxMRounds.mdl",
- price = 250,
- amountGiven = 30,
- })
- DarkRP.createAmmoType("fas2_ammo_50ae", {
- name = ".50 AE Ammo (14 Rounds)",
- model = "models/Items/BoxMRounds.mdl",
- price = 250,
- amountGiven = 14,
- })
- DarkRP.createAmmoType("fas2_ammo_50bmg", {
- name = ".50 BMG Ammo (20 Rounds)",
- model = "models/Items/BoxMRounds.mdl",
- price = 250,
- amountGiven = 20,
- })
- DarkRP.createAmmoType("fas2_ammo_357sig", {
- name = ".357 SIG Ammo (30 Rounds)",
- model = "models/Items/BoxMRounds.mdl",
- price = 250,
- amountGiven = 30,
- })
- DarkRP.createAmmoType("fas2_ammo_380acp", {
- name = ".380 ACP Ammo (60 Rounds)",
- model = "models/Items/BoxMRounds.mdl",
- price = 250,
- amountGiven = 60,
- })
- DarkRP.createAmmoType("fas2_ammo_454casull", {
- name = ".500 S&W Ammo (10 Rounds)",
- model = "models/Items/BoxMRounds.mdl",
- price = 250,
- amountGiven = 10,
- })
- DarkRP.createAmmoType("fas2_ammo_545x39", {
- name = "5.45x39MM Ammo (60 Rounds)",
- model = "models/Items/BoxMRounds.mdl",
- price = 250,
- amountGiven = 60,
- })
- DarkRP.createAmmoType("fas2_ammo_556x45", {
- name = "5.56x45MM Ammo (60 Rounds)",
- model = "models/Items/BoxMRounds.mdl",
- price = 250,
- amountGiven = 60,
- })
- DarkRP.createAmmoType("fas2_ammo_762x39", {
- name = "7.62x39MM Ammo (60 Rounds)",
- model = "models/Items/BoxMRounds.mdl",
- price = 250,
- amountGiven = 60,
- })
- DarkRP.createAmmoType("fas2_ammo_762x51", {
- name = "7.62x51MM Ammo (40 Rounds)",
- model = "models/Items/BoxMRounds.mdl",
- price = 250,
- amountGiven = 40,
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement