Quote:
Originally Posted by Mikado
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 MessageType, char[] 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_INVITE, msg);
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);
}
}
}
__________________