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

length of ns_disallowed_weapons is truncated #650

Open
uniboi opened this issue Jun 17, 2023 · 3 comments
Open

length of ns_disallowed_weapons is truncated #650

uniboi opened this issue Jun 17, 2023 · 3 comments

Comments

@uniboi
Copy link
Contributor

uniboi commented Jun 17, 2023

when adding almost every weapon to ns_disallowed_weapons the convar is truncated

ns_disallowed_weapons "mp_weapon_r97,mp_weapon_alternator_smg,mp_weapon_car,mp_weapon_hemlok_smg,mp_weapon_lmg,mp_weapon_lstar,mp_weapon_esaw,mp_weapon_rspn101,mp_weapon_vinson,mp_weapon_hemlok,mp_weapon_g2,mp_weapon_shotgun,mp_weapon_mastiff,mp_weapon_dmr,mp_weapon_doubletake,mp_weapon_epg,mp_weapon_smr,mp_weapon_pulse_lmg,mp_weapon_softball,mp_weapon_autopistol,mp_weapon_semipistol,mp_weapon_wingman,mp_weapon_shotgun_pistol,mp_weapon_rocket_launcher,mp_weapon_arc_launcher,mp_weapon_defender,mp_weapon_mgl,mp_weapon_wingman_n,mp_weapon_rspn101_og"

maybe a ns_allowed_weapons makes sense?

@uniboi uniboi changed the title length of ns_disallowed_weapons appears to be too long length of ns_disallowed_weapons is truncated Jun 17, 2023
@GeckoEidechse GeckoEidechse changed the title length of ns_disallowed_weapons is truncated length of ns_disallowed_weapons is truncated Jun 19, 2023
@GeckoEidechse
Copy link
Member

I guess convars have a max size? ^^

@uniboi
Copy link
Contributor Author

uniboi commented Jun 19, 2023

yes, 232 chars is the limit. The entire list of all weapons is 530 bytes long

@ASpoonPlaysGames
Copy link
Contributor

ASpoonPlaysGames commented Jul 20, 2023

maybe a ns_allowed_weapons makes sense?

IMO a better solution would be to have an ns_weapon_filter or something, combined with something like ns_weapon_filter_is_blacklist (bool). That way we don't have to deal with conflicts when someone inevitably tries to both ban and allow a weapon.

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

No branches or pull requests

3 participants