[QWERSTRICTION]

Hello,i want to show you my first addon.
This is [QWERSTRICTION] weapon restriction and weapon loadout addon for server owners.

ULX admin mod recommended for DComboBox for ulx groups but it works without ulx.

------USAGE----------------------------
You must to be superadmin.
Type to console “qwerstriction” or better
bind p qwerstriction.

Write in chat !qwerst for menu open

Description section:

  1. Weapons
    In this section you can add weapons to ban list for each group.
    The biggest button inserts all weapons that you have.
    Just press the weapon name and group in inset “remove Weapon” to clear the panel and ban list.

http://puu.sh/hRXOA.jpg


http://puu.sh/hRXPr.jpg

  1. Loadout
    Loadout- default weapons after player spawn.
    in this section you can add custom loadouts and BIG button inherits,that mean you can add many weapons by pressing 1 click.
    Also you can set ammo for weapons and groups(group should be in loadout)

http://puu.sh/hRXQk.jpg


http://puu.sh/hRXQT.jpg

  1. Entities- Ban entities list from Q menu
    i think i will not to describe you how to work with it,its easy.

http://puu.sh/hRXR4.jpg

  1. Toolgun
    Ban toolgun things for each group.
    There is a button named “tool name” that can help you if you can’t find tool name.

http://puu.sh/hRXRf.jpg

  1. NPC
    Just set limit and ban npc class for each group.

http://puu.sh/hRXRQ.jpg

  1. Props
    Just set limit and ban model props for each group.

  2. Ragdoll
    Just set limit and ban model ragdolls for each group.

  3. Vehicles
    Just set limit and ban class of vehicle(car) for each group.

DOWNLOAD LINKS

Workshop

http://steamcommunity.com/sharedfiles/filedetails/?id=442284822

github

https://github.com/Seal13581/qwerstriction/tree/master

Nice

Your code is full of unnecessary file reading calls and pretty terrible overall, but pretty good gui at least.

Like what the hell. Read the file once and store the data in a global.
[lua]
local function Checkabyz() ///
if !file.Exists(“qwerstriction/weapon.txt”,“DATA”) then return end ///
local List=util.KeyValuesToTable(file.Read(“qwerstriction/weapon.txt”,“DATA”)) ///
for k,v in pairs(player.GetAll()) do ///
for n,s in pairs(List) do ///
for i=1,#s do ///
if v:IsUserGroup(n) && v:HasWeapon(s*) then ///
v:StripWeapon(s*) ///
end ///
end ///
end ///
end ///
end ///
hook.Add(“Tick”,“CheckAbyzz”,Checkabyz)
[/lua]