October 22, 2019, 02:38:02 PM

Author Topic: Restrict Weapon CVARs not working  (Read 652 times)

Offline parajox

  • Level 0 Beginner
  • Posts: 5
Restrict Weapon CVARs not working
« on: March 16, 2019, 10:37:42 AM »
Hello,

if i use es wcs_restrict event_var(userid) all;es wcs_unrestrict event_var(userid) "knife,deagle" on a race, it won't work. I can still buy weapons.

Any solution for this?

Offline Tha Pwned

  • Watchdog
  • Level 7 Expert
  • *****
  • Posts: 213
  • Country: dk
  • 5% coder, 85% derp, 10% herp
Re: Restrict Weapon CVARs not working
« Reply #1 on: March 17, 2019, 10:08:47 PM »
Hello,

if i use es wcs_restrict event_var(userid) all;es wcs_unrestrict event_var(userid) "knife,deagle" on a race, it won't work. I can still buy weapons.

Any solution for this?
Thanks for reporting! That'd be fixed in the newest version.
Quote from: La Muerte
17:44 - #La Muerte: FU whipe your ass so you hear better!
Quote from: La Muerte
13:41 - Muerte: what is it with you and I talking about asses in eachothers quotes?
13:41 - Muerte: ass buddies!
If you need help, got a question about Python, or just need to chat with a friendly guy, feel free to add me on Steam.

Offline WCS - Wookie

  • Level 6 Experienced
  • *****
  • Posts: 133
  • Country: nz
  • Qualified Teacher, working in IT and loving WCS.
Re: Restrict Weapon CVARs not working
« Reply #2 on: March 21, 2019, 12:27:03 AM »
In the meantime you could always try manually restricting each weapon by name separating them by comma's. I used to have a block called es_kniferestrict.txt and i'd just load this block into the spawncmd of my races that needed to be restricted to knife.
If you like WCS and are from AUS/NZ drop by our server to take a look.


Offline Tha Pwned

  • Watchdog
  • Level 7 Expert
  • *****
  • Posts: 213
  • Country: dk
  • 5% coder, 85% derp, 10% herp
Re: Restrict Weapon CVARs not working
« Reply #3 on: March 25, 2019, 10:31:44 PM »
In the meantime you could always try manually restricting each weapon by name separating them by comma's. I used to have a block called es_kniferestrict.txt and i'd just load this block into the spawncmd of my races that needed to be restricted to knife.
While that certainly is a possibility, I'd rather have any problems you may find fixed, so we don't have to resort to workarounds, and can instead use the provided commands (or you can create your own - feel free to do a pull request on Github with your ideas!), so we can get a (somewhat) uniform way of doing things.
Quote from: La Muerte
17:44 - #La Muerte: FU whipe your ass so you hear better!
Quote from: La Muerte
13:41 - Muerte: what is it with you and I talking about asses in eachothers quotes?
13:41 - Muerte: ass buddies!
If you need help, got a question about Python, or just need to chat with a friendly guy, feel free to add me on Steam.

Offline WCS - Wookie

  • Level 6 Experienced
  • *****
  • Posts: 133
  • Country: nz
  • Qualified Teacher, working in IT and loving WCS.
Re: Restrict Weapon CVARs not working
« Reply #4 on: April 08, 2019, 01:31:30 AM »
Quote
I'd rather have any problems you may find fixed, so we don't have to resort to workarounds,


Hey no arguments from me around that one Pwned. It's always better to cure the illness than put a bandaid on it.
If you like WCS and are from AUS/NZ drop by our server to take a look.