View Single Post
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen.
Old 06-03-2018 , 05:35   Re: [ANY] ASteambot - Redirect
Reply With Quote #7

Quote:
Originally Posted by Mikado View Post
Sorry for the late feedback lol.

Thank's mate, it's working well the bot instantly sends your the message.
But if the bot isn't friend with you, nothing happend nothing returned on the chat... if you want, i suggest you to add something like, if the bot isn't friend automatically send a friend request, or return a chat message like: "Please, use !friend to add the bot to use this fonction" ...

Keep it up (y) you are doing well ;)
Well, it's already sending friend request when the bot can't send any messages (and that the user who tried to get redirected is in game) :

PHP Code:
public ASteambot_Message(AS_MessageType MessageTypechar[] msg, const int msgSize)
{
    if(
MessageType == AS_SIMPLE)
    {
        
SetFailState(msg);
    }
    else if(
MessageType == AS_NOT_FRIENDS)
    {
        
int client FindClientBySteamID(msg);
        if(
client != -1)
        {
            
ASteambot_SendMesssage(AS_FRIEND_INVITEmsg);
            
CPrintToChat(client"{green}%s{default} You are not friend with me and I can't send you steam messages. I sent you a friend invite."MODULE_NAME);
        }
    }

__________________
Want to check my plugins ?
Arkarr is offline