General > Developers Corner

Get group of SteamID

(1/1)

BigBrainAFK:
Hello,

I have recently scripted some things and now I kind off ran into some problems.
I have to figure out how I can check if a SteamID is in a specific user group.

Is there an ULX or UCL function for this?


//EDIT: I also noticed that every group that has banid or kickid rights is able to ban everyone including people from groups they normally can't target.

JamminR:
Could use ULib's getPlyByID
http://ulyssesmod.net/docs/files/lua/ulib/shared/player-lua.html#getPlyByID

and then GetUserGroup or CheckGroup the ply object.
http://ulyssesmod.net/docs/files/lua/ulib/shared/sh_ucl-lua.html#Player:GetUserGroup

As for can_target, I don't remember well enough to know if that is by design or something not actually right.
It doesn't sound right, and is likely you have a group inheritance branch issue somewhere.
That question would fit best in another thread.

BigBrainAFK:
thx for the quick help and I will definitely open a new thread for the banid / kickid thing cause I checked all can target field nothing wrong there. I also would like to know how inheritance could be the issue of the banid /kickid thing.

MrPresident:
I'm going to work on this. I'll post once I have an update for you.

An Error Has Occurred!

array_keys(): Argument #1 ($array) must be of type array, null given

[0] Board index

Go to full version