npc chat help
#2

pawn Код:
OnPlayerText(playerid, text[])
{
    if (strfind(text, "Wheres a good place to eat?") != -1)
    {
        switch(random(3))
        {
            case 0:
            {
                SendPlayerMessageToPlayer(playerid,0,"The steak house is a good place in north LV near the fire station.");
            }
            case 1:
            {
                SendPlayerMessageToPlayer(playerid,0,"Theres an awesome buffet at the four dragons just southbound from here.");
            }
            case 2:
            {
                SendPlayerMessageToPlayer(playerid,0,"Theres a donut shop all the way southbound this road to the right!");
            }
        }
        return 0;
    }
    return 1;
}
Untested.
Reply


Messages In This Thread
npc chat help - by farris - 26.11.2010, 14:18
Re: npc chat help - by JamesC - 26.11.2010, 14:22

Forum Jump:


Users browsing this thread: 1 Guest(s)