ULX Addon

I came to FacePunch because this is where to find all the people that actually know how to code.
This is what I want it to be:

-An actual ulx addon, not just an “if is admin” script.
-Made for the ULX svn version
-Allows the designated group to type !gun and then be given a weapon_twitch_m249 with 1000 ammo.

What do you mean by your first point? ULX is an admin mod , so Player:IsUserGroup can be used.

I think you have no idea about what you want.

I would just like an addon for ulx where you type !gun and if you have the sufficient rights, you are given the weapon

that’s like… 3 lines without ulx, idk about with it, i have not looked into their API.

With ULX or not, it should be the same code -_-. Ya know what, i will be kind and give you half the code ( too lazy to copy/paste the entire thing ).

[LUA]
hook.Add( “PlayerSay”, “anoying person request thingy” , function ( pl, text )

if ( text == "!gun" and pl:IsUserGroup( "mingebag" ) ) then

	pl:Give( "weapon_twitch_m249" )
	-- you can give him the ammo, seeing as you didnt tell me what type of ammo

end

end)
[/LUA]

couldn’t be arsed to test it -_-

Oh hahaha, i’m stupid. I didn’t know that IsUserGroup() was a baked in function with gmod. I never really looked into admin mod scripting.