Jump to content
McKay Development

If statement for message sender


Recommended Posts

Is it possible to make an if statement like

client.on('friendMessage', function (steamID, message) {

    if (message.match('!logoff') {

        if (steamID == 76...) {
        client.sendMessage(steamID, 'logging off.')

        } else {
            client.sendMessage(steamID, 'Sorry, this is an owner-only command'

I just quickly made this script so if there are some errors, I didn't try exactly this script but i tried a script very similar. This part was the same:

if (steamID == 76...) {

And if there's an option it should be easy to make allow everyone except for 1 steamid/user by just changing == in !== right.

Edited by jafix
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.

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.

  • Create New...