26.11.2010, 14:18
ok so im making an npc but when you type a message to it the response comes before the orginal message.that needs to be fixed. heres the code
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 1;
}
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 1;
}