WarCraft: Source

 

GetViewProp

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

Get View Prop


Similar to Get View Player, only this return the index of the prop if a user is looking at one.

 

The correct syntax is:

 

wcs.Command(<userid>).GetViewProp(<callback function>, [Optional: additonal parameters])

 

  • Userid - The userid of the player you'd wish to check if they're looking at a prop
  • Callback-Function - The function that will be run when the command has activated.
  • Optional: additonal parameters - Pass any other parameters you want to pass to the other method here.

 


 

Example:

 

def player_spawn(ev):

    wcs.Command(ev["userid"]).GetViewProp(msgProp)

 

def msgProp(userid, prop_index):

    es.tell(userid, "The user is looking at the prop with index %s" % prop_index)

Comments (0)

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