Author Topic: Restrict Weapons weapon_cz75a  (Read 490 times)

plock

  • Newbie
  • *
  • Posts: 6
    • View Profile
Restrict Weapons weapon_cz75a
« on: March 02, 2017, 05:01:45 AM »
Hi,

I'm trying to restrict a race to weapon_cz75a, but even trying with races that the restriction is working, when it's the waepon weapon_cz75a it doesn't.

Any workarounds for this?

Best Regards,
Plock

plock

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Restrict Weapons weapon_cz75a
« Reply #1 on: March 03, 2017, 02:34:25 AM »
I found out that the cz75a is being identified as a p250 by SDKHook_WeaponCanUse (Used by War3_WeaponRestrictTo)

Any help, please?

joshtrav

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Restrict Weapons weapon_cz75a
« Reply #2 on: April 02, 2017, 09:46:32 PM »
This is python, but the information you get from it should suffice for what you are running into:

Code: [Select]
index = userid.getCurrentIndex(weapon)
        if not index:
            if sm.GAME_NAME == "csgo":
                if weapon.matchRestrict("m4a1"):
                    weapon = wp("m4a1_silencer")
                elif weapon.matchRestrict("p250"):
                    weapon = wp("cz75a")
                elif weapon.matchRestrict("hkp2000"):
                    weapon = wp("usp_silencer")
                elif weapon.matchRestrict("deagle"):
                    weapon = wp("revolver")
                else:
                    return