WarCraft: Source

 

Damage

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

Damage


This command damages another user, and if you wish, give credit for another user, and specify the damage type.

 

The correct syntax is:

 

wcs.Command(<userid>).Damage(<amount>,[optional: Type],[optional: Attackerid])

 

  • Userid - The player who will be receiving the damage
  • Amount - The amount of damage that the user will receive
  • Optional: Type - The damage type that the damage will inflict:
    • 0 - Generic
    • 1 - Crush
    • 2 - Bullet
    • 4 - Slash
    • 8 - Burn
    • 16 - Freeze
    • 32 - Fall (Default: Recommended for CS:S) -
    • 64 - Blast
    • 128 - Club
    • 256 - Shock
    • 512 - Sonic
    • 1024 - Energy Beam
    • 16384 - Drown
    • 32768 - Paralysis
    • 65536 - Nerve Gas
    • 131072 - Poison
    • 262144 - Radiation
    • 524288 - Drown Recover
    • 1048576 - Chemical
    • 2097152 - Slow Burn
    • 4194304 - Slow Freeze
  • Optional: Attacker - This is the user who you will get the credit for the damage given


Examples:

 

Without type/credit

def player_hurt(ev):

    player = wcs.Command(userid)

    player.Damage(10)

 

With type/credit

def player_hurt(ev):

    player = wcs.Command(userid)

    player.Damage(10, 131072 , ev['attacker'])

Comments (0)

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