Ulysses
General => Developers Corner => Topic started by: machond on December 11, 2016, 09:25:06 AM
-
Hi,
i want write a custom weapon, buy i dont know how do a part of code about adding ply to group when use a weapon.
-
(http://wiki.garrysmod.com/favicon.ico) SWEP:PrimaryAttack (http://wiki.garrysmod.com/page/WEAPON/PrimaryAttack)
Inside your swep primary (and/or (http://wiki.garrysmod.com/favicon.ico) SWEP:SecondaryAttack (http://wiki.garrysmod.com/page/WEAPON/SecondaryAttack)), do your group change.
If making it compatible without requiring ULib, you can use (http://wiki.garrysmod.com/favicon.ico) Player:SetUserGroup (http://wiki.garrysmod.com/page/Player/SetUserGroup), and if you have ULib installed, it will see the player group changed and adjust accordingly.