WarCraft: Source

 

registerWeaponRestriction

Page history last edited by freddukes@... 1 yr ago

registerWeaponRestriction 

 


This command registers a weapon restriction for a certain class... You can use either 'block only' or 'allow only' to allow/block any weapon from being picked up...

 

 

The correct syntax is:

 

wcs.Race('My Race Name').registerWeaponRestriction(<'block only/allow only'>,<(tuple of weapons)>)

 

  • Block only / allow only - This is to define whether you want to define the list of weapons to be either blocked or allowed. If the list of weapons defined are to only be allowed, use 'allow only', otherwise use 'block only'.
  • Tuple of weapons - If you're not familiar with python tuples yet, then see this page as it is a brilliant resource. You will use a list to define the weapons, then you can allow or block them.

Example:

 

race = wcs.Race('Knifety Knife Knife class')

allowed_weapons = ('knife','hegrenade','smokegrenade','flashbang')

race.registerWeaponRestriction('allow only',allowed_weapons)


Note: If you are not using a weapon restriction, do NOT use this command!

Comments (0)

You don't have permission to comment on this page.