Talking bots
#5

At the top of your script:
pawn Код:
new talkSentences = -1;
And the timer function:
pawn Код:
forward TaxiTalk(playerid);
public TaxiTalk(playerid)
{
    switch(talkSentences)
    {
        case 0:
        {
            ProxDetector(3.0, playerid, "Taxi Driver says: Haven't I seen you before?", COLOR_GREY, COLOR_GREY, COLOR_GREY, COLOR_GREY, COLOR_GREY);
            talkSentences++;
        }
        case 1:
        {
            ProxDetector(3.0, playerid, "Taxi Driver says: Lovely weather we are having.", COLOR_GREY, COLOR_GREY, COLOR_GREY, COLOR_GREY, COLOR_GREY);
            talkSentences++;
        }
        case 2:
        {
            ProxDetector(3.0, playerid, "Taxi Driver says: You look happy.", COLOR_GREY, COLOR_GREY, COLOR_GREY, COLOR_GREY, COLOR_GREY);
            talkSentences = -1;
        }
    }
    return 1;
}
And one more thing, edit your part where the timer is started like this:
pawn Код:
if(vehicleid == botcar)
    {
        SendClientMessage(playerid, COLOR_GREY, "Taxi Driver says: Welcome to the Taxi mate, please sit back and enjoy the ride.");
        talkSentences = 0;
        SetTimer("TaxiTalk", 60000, true);
    }
And that should do it. Test it and tell me if it works.
Reply


Messages In This Thread
Talking bots - by Luis- - 21.05.2011, 15:17
Re: Talking bots - by Biesmen - 21.05.2011, 15:22
Re: Talking bots - by boelie - 21.05.2011, 15:27
Re: Talking bots - by Luis- - 21.05.2011, 21:36
Re: Talking bots - by Steve M. - 21.05.2011, 23:01
Re: Talking bots - by Luis- - 21.05.2011, 23:22
Re: Talking bots - by Steve M. - 22.05.2011, 10:29
Re: Talking bots - by Luis- - 22.05.2011, 11:43
Re: Talking bots - by Luis- - 18.06.2011, 18:40
Re: Talking bots - by boelie - 18.06.2011, 18:56

Forum Jump:


Users browsing this thread: 2 Guest(s)