WarCraft: Source

 

GiveXp

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

Give Xp


This command gives a user a specefied amount of XP, and with an optional reason.

 

The correct syntax is:

 

wcs.Command(<userid>).GiveXp(<amount>, [optional: "reason"])

 

  • Userid - The id of the player you'd wish to give XP to.
  • Amount - The amount of XP to give
  • Optional: Reason - This will be shown to them in the message which is sent to them


Example:

 

def player_say(ev):

    if ev["text"] == "phr33 cr3d5 pl0x":

        player = wcs.Command(ev["userid"])

        player.GiveXp(100, "asking for Xp"

Comments (0)

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