General > Developers Corner
Restrict Entity/SWEP for ULX 'Donator' Rank?
Samg381:
Hey,
I need a code that will restrict some entities: WAC Aircraft, SCars
and some SWeps: CSS Realistic, Murderthon 9K
To the ULX Rank 'Donator'. I'm making an auto-donation system and this is important.
Thank you!
MrPresident:
You could add this code to the entities and sweps to restrict them to donators.
--- Code: ---if not ply:IsUserGroup("donator") then
return
end
--- End code ---
You might also want to put some kind of message before the return informing the player that only donators are allowed to spawn those things.
Samg381:
Thanks. I just set 'Donator' to inherit from Admin, and than disallowed all admin commands from donator in the groups.cfg.
JamminR:
Samg, that's really not a good idea.
Though perhaps they won't be able to run ULX admin commands, Gmod will see them as an admin, which means any gamemode/mod/whatever that uses IsAdmin to check a player for any special access, they will have it.
Samg381:
Well, I know that, but at the moment it's my only option.
I need Donators to have access to admin only sweps and vehicles.
Navigation
[0] Message Index
[#] Next page
Go to full version