Hello guys im getting error like that
[ERROR] addons/darkrpmodification/lua/darkrp_customthings/ammo.lua:77: ')' expected (to close '(' at line 70) near 'DarkRP'
1. unknown - addons/darkrpmodification/lua/darkrp_customthings/ammo.lua:0
What should i do.
Ammo.lua:
[code]
/*---------------------------------------------------------------------------
/*---------------------------------------------------------------------------
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("pistol", {
name = "Pistol ammo",
model = "models/Items/BoxSRounds.mdl",
price = 30,
amountGiven = 24
}
DarkRP.createAmmoType("357", {
name = "Deagle/Revolver ammo",
model = "models/Items/BoxSRounds.mdl",
price = 30,
amountGiven = 24
}
DarkRP.createAmmoType("buckshot", {
name = "Shotgun ammo",
model = "models/Items/BoxBuckshot.mdl",
price = 50,
amountGiven = 8
})
DarkRP.createAmmoType("smg1", {
name = "Smg ammo",
model = "models/Items/BoxMRounds.mdl",
price = 80,
amountGiven = 30
})
DarkRP.createAmmoType("ar2", {
name = "LMG ammo",
model = "models/Items/BoxMRounds.mdl",
price = 200,
amountGiven = 125
})
DarkRP.createAmmoType("ar2", {
name = "Assault Rifle ammo",
model = "models/Items/BoxMRounds.mdl",
price = 80,
amountGiven = 30
})
DarkRP.createAmmoType("SniperPenetratedRound", {
name = "Sniper ammo",
model = "models/Items/BoxMRounds.mdl",
price = 100,
amountGiven = 10
})
[/code]
The first two Create Ammo Types you forgot a ) after }
Thank you so much!
Sorry, you need to Log In to post a reply to this thread.