1. Sign up for news, events and more!

    You're currently visiting the official DarkRP Forums as a guest. Sign up now to participate in our community and we'll let you know when we have news.

2 Issues / Anyone can ghost others props / Ammo gives 0

Discussion in 'DarkRP Modding Questions & Help' started by CrimsonHazeTV, Jan 27, 2017.

  1. CrimsonHazeTV

    CrimsonHazeTV New Member

    First issue, say someone builds a base, with fading doors, people can just use their physgun and ghost it, they can not move it, but they can ghost it, I thought it was APAnti, but I uninstalled that and it still happens.

    Second issue is super irritating, I have M9K weapons, and added M9K ammo to ammo.lua it shows up in ammo, and you can buy it but it gives you 0 ammo, it also does not make a sound it usually makes when you pick up ammo, have a look at my code.
    Code (Text):

    GAMEMODE:AddAmmoType("m9k_ammo_buckshot", "Shotgun Rounds", "models/Items/357ammobox.mdl", 200, 30)
     
    I also tried it this way but it still happened
    Code (Text):

    DarkRP.createAmmoType("m9k_ammo_buckshot", {
        name = "Shotgun Rounds",
        model = "models/Items/357ammobox.mdl",
        price = 200,
        amountGiven = 30
    })
     
     
  2. Pab14567

    Pab14567 Well-Known Member

    Make sure you set up FPP Properly.

    Are you using any other anti prop kill addon?
    Also are you saying that people who spawned in a prop with a fading door with it can do that ?
    or people can physgun other people's fading doors.

    Fading doors ghost when they've been physgunned

    second issue

    Dont' use it with ammo.lua

    I've had that same problem and people have also had the same problem but just create it in entities.

    Create it under entities.lua for your ammo.
     
  3. CrimsonHazeTV

    CrimsonHazeTV New Member

  4. Pab14567

    Pab14567 Well-Known Member

    Did you set up FPP properly?

    and are they random players or are they actually mods and stuff?

    and like I said fading doors always ghost when they're touched with physgun beam
     
  5. CrimsonHazeTV

    CrimsonHazeTV New Member

    What do you mean by properly?
    They are just random players, and really? was that always a feature? means anyway can just walk in and steal stuff
     
  6. Sir Klutch

    Sir Klutch Active Member

    Sounds like an issue with your prop protection. Try removing it and see if the issue consists, if it doesn't then find you PhysgunPickup hook and make a few changes

    Code (Lua):

    if ent:GetClass() == "prop_physics" and ent.CPPICanPhysgun and ent:CPPICanPhysgun(ply) then
            local noplease = tostring(ply:SteamID())
         
            ent.DontTouch = ent.DontTouch or {}
            ent.DontTouch[noplease] = true
    As for the ammo, I have no idea.
     
  7. CrimsonHazeTV

    CrimsonHazeTV New Member

    I want to thank both of you, I had my suspicions it was Falcos, but when Pab said it wouldn't be that, I figured it would be Enforcer, and boom, it was :) Thank you!
     
  8. Pab14567

    Pab14567 Well-Known Member

    If you need anything else add me

    steamcommunity.com/id/cumonsteponit
     
  9. Kazuya Mishima

    Kazuya Mishima New Member

    Hey CrimsonHaze, I'm having the same issue with peoples physgun ghosting players props.
    You said it was enforcer.
    What's that?
    Part of ULX?
    I'm stuck.
    Plz help, thanks.
     
  10. {NG} Mr. Nightmare

    {NG} Mr. Nightmare New Member

    The ammo, it may be that it's just buckshot not m9k_ammo_buckshot so try
    Code (Text):
    DarkRP.createAmmoType("buckshot", {
        name = "Shotgun Rounds",
        model = "models/Items/357ammobox.mdl",
        price = 200,
        amountGiven = 30
    })
    That's what works on my server anyways
    --- Double Post Merged, Oct 3, 2017 ---
    This is my entire ammo.lua file:
    Code (Text):
    --[[---------------------------------------------------------------------------
    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("smg1", {
        name = "SMG ammo",
        model = "models/Items/BoxMRounds.mdl",
        price = 80,
        amountGiven = 30,
    })

    DarkRP.createAmmoType("ar2", {
        name = "Assault Rifle ammo",
        model = "models/Items/BoxMRounds.mdl",
        price = 80,
        amountGiven = 30,
    })

    DarkRP.createAmmoType("buckshot", {
        name = "Shotgun ammo",
        model = "models/Items/BoxBuckshot.mdl",
        price = 80,
        amountGiven = 8,
    })

    DarkRP.createAmmoType("SniperPenetratedRound", {
        name = "Sniper ammo",
        model = "models/Items/BoxMRounds.mdl",
        price = 80,
        amountGiven = 20,
    })

     
     

Share This Page