SecurGate
  • ☔Get Started
    • ⚙️Installation
  • ❌Errors
    • ⛔Auto Configs Errors
  • 📃Docs
    • 🤖Auto Configs
    • 💧Client side configurations
      • 💙Anti Godmod
      • 🔫Anti Give Weapon
    • ⌨️Commands
Powered by GitBook
On this page
  • Put our Trigger before GiveWeaponToPed Natives
  • Syntax
  • Exemple :
  1. Docs
  2. Client side configurations

Anti Give Weapon

Setting up our Give Weapon Protection

Put our Trigger before GiveWeaponToPed Natives

Note: Others Natives can give weapons so add our trigger before them too.

Syntax

Manager = exports["SecurGate"]:GetManager()
Manager.GiveSafeWeapon([WEAPON NAME], GetCurrentResourceName())

Exemple :

client_side.lua
-- Default script exemple :
RegisterCommand("giveweapon", function(source, args)
    GiveWeaponToPed(PlayerPedId(), GetHashKey(args[1]), 255, false, true)
end)

-- Protected Script exemple : 

RegisterCommand("giveweapon", function(source, args)
    Manager = exports["SecurGate"]:GetManager()
    Manager.GiveSafeWeapon(args[1], GetCurrentResourceName())
    Wait(50) -- Add a little wait to make sure the weapon is register in SecurGate.
    GiveWeaponToPed(PlayerPedId(), GetHashKey(args[1]), 255, false, true)
end)
PreviousAnti GodmodNextCommands

Last updated 10 months ago

📃
💧
🔫