Author Topic: SetWeaponActive randomly fails |Solved|  (Read 541 times)

0 Members and 1 Guest are viewing this topic.

Offline Hacktank

  • Camper
  • ***
  • Posts: 462
  • Soldat Scripter
    • HTZRPG
SetWeaponActive randomly fails |Solved|
« on: December 06, 2009, 08:15:07 pm »
When I use setweaponactive, it usually works the first time. Say I enable the socom and disable all else, /kill, all that is there is socom. Then I change classes in my script to a class that has, for example Spas and Law available. (Yes, im sure I am useing the correct ID's) And enable those and disable all else. There is only a small chance that it will change the weapon selection menu correctly. Is this due to packet loss? Is it fixable?
« Last Edit: December 06, 2009, 10:31:22 pm by Hacktank »


Offline EnEsCe

  • Retired Soldat Developer
  • Flamebow Warrior
  • ******
  • Posts: 3101
  • http://enesce.com/
    • [eC] Official Website
Re: SetWeaponActive randomly fails
« Reply #1 on: December 06, 2009, 09:46:22 pm »
If you are doing a massive amount of SetWeaponActive calls at once, yes packet loss is highly likely. Each call = 1 packet

Offline Hacktank

  • Camper
  • ***
  • Posts: 462
  • Soldat Scripter
    • HTZRPG
Re: SetWeaponActive randomly fails
« Reply #2 on: December 06, 2009, 10:31:05 pm »
Ok, I found a good makeshift way if getting it to work: try to (dis/en)able each weapon 10 times. Thanks for the quick reply Ec.