Jump to content
McKay Development

Purpose of ID Events and how to listen for them?


rektbot

Recommended Posts

Hi There,

 

I understand what ID events do, emitting the event with a suffix eg #steamid. My main question is what's the purpose of this? Second question is how would you listen for it? (given that it would be impractical to hardcode a steamid)

 

Thanks in advance

Edited by rektbot
Link to comment
Share on other sites

Please post in the correct board next time. I've moved your topic.

 

An ID event is a special kind of event specific to steam-user where both the base event and the event suffixed with the SteamID of the relevant account are emitted. For example, if I sent you a chat message, both friendMessage and friendMessage#76561198006409530 would be emitted. Listening for the latter event is mostly useful for when you only care about one specific user. For example, you might hardcode a listener for friendMessage#yoursteamid to listen for admin commands (or perhaps something like on('friendMessage#' + config.adminSteamID)).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...