Is there a Ulib way to check to see if a certain player has a specific access in their allow table?
I've noticed how if you use something like.. ulx userallow <player> "blahblah1" it will add blahblah1 to their list of allows. I thought this would be a GREAT way to use flags in ULX. With a little bit of modification to a tool or Server Entity file, you could have it check for these flags before allowing them to use/spawn the entity/tool.
Right now, Im using IsUserGroup("blah") to do this, but it only will work for groups I set in there.. where this would be soo much better and could even be done dynamically.. while in game and to users as opposed to groups..
something like this...
**ply is assumed to be the player and already defined by the function you are modifying... This example would be to my Fairy ENT.**
If !ulib.hasaccess(ply,"fairy") then
ulib.tsay(ply,"Sorry, this entity is reserverd for donators and administrators only.", true)
return
end
then you could just add "fairy" to all the groups in your groups.txt file to the allows to give them access... This would also let you use the
ulx userallow
and
ulx userdeny
commands to give and revoke these flags in game and without editing any files at all.
I think there has to already be a function like this, because you have tools and commands that can be given to players in game that is saved to the users.txt file and some function has to check if they ahve these accesses.
right?
*crosses fingers*