21.05.2011, 23:01
At the top of your script:
And the timer function:
And one more thing, edit your part where the timer is started like this:
And that should do it. Test it and tell me if it works.
pawn Код:
new talkSentences = -1;
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;
}
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);
}