Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with SAM #62

Open
timothybvf opened this issue Dec 23, 2020 · 10 comments
Open

Issues with SAM #62

timothybvf opened this issue Dec 23, 2020 · 10 comments

Comments

@timothybvf
Copy link

There seems to be issues with SAM where rank restrictions/limits aren't being followed when a player originally joins, if they are reranked it'll work correctly.

@FelixKLG
Copy link

I can confirm, I too having this issue; when players spawn in, if they're the appropriate rank they may edit WUMA's in-game config however when they try to spawn weapons it will act as if they're the user rank unless they recieve their rank again whilst in-game via !adduser FelixKLG manager

@Synkstar
Copy link

Synkstar commented Jan 23, 2022

Its because sam overrides the GetlLmit function and it sets it to null if your not using sam limits. You have to disable all sam restrictions, limits, etc in the menu and comment out the GetLimit parts in sh_restrictions.lua in sam.
image
this is what mine looks like

@Synkstar
Copy link

Also you have to give people permission to access weapons and vehicles etc in SAM if its a sandbox server for example

@Megamezzomixer
Copy link

Sorry to bump this old issue, but even after editing the file mentioned above, the problem still persists.

@Synkstar
Copy link

Synkstar commented Apr 3, 2022

Actually you could remove the restrictions file and it works too. I just did that. If this doesnt work it might be another addon other than SAM and wuma causing the problem

@Megamezzomixer
Copy link

Sadly it did not work. Somehow WUMA still sees me as a regular user, even though I am not. Resetting my rank gives me intended access though.

@Synkstar
Copy link

Synkstar commented Apr 4, 2022

I never noticed this but your right it behaves like you are a user for some reason. Thats strange.

@Synkstar
Copy link

Synkstar commented Apr 4, 2022

I think its because WUMA caches the usergroup that you are in basically. Im going to try to make it just grab the usergroup each time

@Synkstar
Copy link

Synkstar commented Apr 4, 2022

        if IsValid(user) then
            local group = user:GetUserGroup()
            WUMA.RefreshGroupRestrictions(user,group)
            WUMA.RefreshGroupLimits(user,group)
            WUMA.RefreshLoadout(user,group)
         end

image

This works as a temporary fix if you put it in wuma/users.lua like that so it refreshes it after one second when they join.

@Megamezzomixer
Copy link

        if IsValid(user) then
            local group = user:GetUserGroup()
            WUMA.RefreshGroupRestrictions(user,group)
            WUMA.RefreshGroupLimits(user,group)
            WUMA.RefreshLoadout(user,group)
         end

image

This works as a temporary fix if you put it in wuma/users.lua like that so it refreshes it after one second when they join.

This is the fix of my problem! I have already tried a similar approach with SetUserGroup(ply:sam.get_rank()) with a timer, but this was not enough.

Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants