[ajuda] FS CHAT BOT
#3

Quote:
Originally Posted by Lucas Nicolas
Посмотреть сообщение
Passa o OnPlayerText!
pawn Код:
public OnPlayerText(playerid, text[])
{
    new BotStr1[200];
    format(BotStr1, sizeof(BotStr1), "%s?", BotName);
    new BotStr2[200];
    format(BotStr2, sizeof(BotStr2), "%s:", BotName);
    new BotStr3[200];
    format(BotStr3, sizeof(BotStr3), "%s: %s", BotName, AgeQuestion);

    if(strcmp(BotName, text, true) == 0)
    {
        if(BotOn == 1)
        {
            new Name[MAX_PLAYER_NAME];
            GetPlayerName(playerid, Name, sizeof(Name));
            format(String[playerid], 200, "%s, %s", Name, Sayings[random(sizeof(Sayings))]);
            //SetTimerEx("Send",170,0,"i", playerid, String[playerid]);
            SetTimerEx("Send",170,0,"i", playerid);
            return 1;
        }
    }
    else if(strcmp(BotStr1, text, true) == 0)
    {
        if(BotOn == 1)
        {
            new Name[MAX_PLAYER_NAME];
            GetPlayerName(playerid, Name, sizeof(Name));
            format(String[playerid], 200, "%s, %s", Name, Sayings[random(sizeof(Sayings))]);
            //SetTimerEx("Send",170,0,"i", playerid, String[playerid]);
            SetTimerEx("Send",170,0,"i", playerid);
            return 1;
        }
    }
    else if(strcmp(BotStr3, text, true) == 0)
    {
        if(BotOn == 1)
        {
            new Name[MAX_PLAYER_NAME];
            GetPlayerName(playerid, Name, sizeof(Name));
            format(String[playerid], 200, "%s, eu sou tenho %d a mais que vocк.", Name, BotAge);
            //SetTimerEx("Send",170,0,"i", playerid, String[playerid]);
            SetTimerEx("Send",170,0,"i", playerid);
            return 1;
        }
    }
    else if(strfind(text, BotStr2, true) != -1 && strfind(text, "?", true, 0) != -1)
    {
        if(BotOn == 1)
        {
            new Name[MAX_PLAYER_NAME];
            GetPlayerName(playerid, Name, sizeof(Name));
            format(String[playerid], 200, "%s, %s", Name, Answers[random(sizeof(Sayings))]);
            //SetTimerEx("Send",170,0,"i", playerid, String[playerid]);
            SetTimerEx("Send",170,0,"i", playerid);
            return 1;
        }
    }
    else if(strcmp(BotStr2, text, true) == 0)
    {
        if(BotOn == 1)
        {
            new Name[MAX_PLAYER_NAME];
            GetPlayerName(playerid, Name, sizeof(Name));
            format(String[playerid], 200, "Errrm %s, %s", Name, EmptyQuestionResponces[random(sizeof(EmptyQuestionResponces))]);
            //SetTimerEx("Send",170,0,"i", playerid, String[playerid]);
            SetTimerEx("Send",170,0,"i", playerid);
            return 1;
        }
    }
    else if(strfind(text, BotName, true) != -1)
    {
        if(BotOn == 1)
        {
            new Name[MAX_PLAYER_NAME];
            GetPlayerName(playerid, Name, sizeof(Name));
            format(String[playerid], 200, "%s, %s", Name, TalkingAboutMe[random(sizeof(TalkingAboutMe))] );
            //SetTimerEx("Send",170,0,"i", playerid, String[playerid]);
            SetTimerEx("Send",170,0,"i", playerid);
            return 1;
        }
    }
    return 1;
}
Reply


Messages In This Thread
[ajuda] FS CHAT BOT - by Allanrokeiro - 17.02.2011, 14:31
Re: [ajuda] FS CHAT BOT - by Macintosh - 17.02.2011, 15:35
Re: [ajuda] FS CHAT BOT - by Allanrokeiro - 17.02.2011, 16:41
Re: [ajuda] FS CHAT BOT - by Macintosh - 17.02.2011, 16:54
Re: [ajuda] FS CHAT BOT - by Baddark2131 - 17.02.2011, 23:45
Re: [ajuda] FS CHAT BOT - by CyNiC - 18.02.2011, 01:59
Re: [ajuda] FS CHAT BOT - by Allanrokeiro - 18.02.2011, 13:36

Forum Jump:


Users browsing this thread: 3 Guest(s)