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

Add AllowPreferredWeaponForOnlyVIP config for only VIPs to get preferred weapon #132

Merged
merged 2 commits into from
Apr 22, 2024

Conversation

GL1TCH1337
Copy link
Contributor

On my server I needed this. I don't know is it best way to do it. But it works.

@crashzk
Copy link
Contributor

crashzk commented Apr 21, 2024

This would only be for AWP right?

If so, wouldn't it just increase the number NumberOfExtraVipChancesForPreferredWeapon?

  • NumberOfExtraVipChancesForPreferredWeapon: When randomly selecting preferred weapons per team (ie. "AWP queue"), how many extra chances should VIPs get.
    • The default is 1, meaning VIPs will get 1 extra chance. For example, lets say there are 3 players on the team and this config is set to 1. Normally each person would have a 33% chance of getting the AWP, but in this case, since one of the players is a VIP, the VIP will get a 50% chance of getting the AWP, and the other two players will each have 25% chance of getting the AWP.
    • If you set this to 0, there will be no preference for VIPs.

@GL1TCH1337
Copy link
Contributor Author

If you make NumberOfExtraVipChancesForPreferredWeapon like 99 or something. It will add 1 vip to list 99 times and if there are 5 VIP on the server the list will be 99x5. You can put small numbers but there will be very small chance to a non vip player to get preffered weapon. In my opinion a simple check like this can improve the plugin little bit but you're right.

@yonilerner
Copy link
Owner

Maybe we can keep just NumberOfExtraVipChancesForPreferredWeapon but make it so -1 is a special value that means "VIP only"?

@GL1TCH1337
Copy link
Contributor Author

It is also a good idea instead of adding new config. I will try to implement it. You can modify it afterwards if anything looks bad etc.

…pon and added language files.

Also added check for command.
@yonilerner yonilerner merged commit 9088805 into yonilerner:main Apr 22, 2024
2 checks passed
@yonilerner
Copy link
Owner

Thank you very much for the contribution!

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

Successfully merging this pull request may close these issues.

3 participants