whats wrong with this?
#1

the problem is when i type hello it brings the resetaughnt and the greeting

public OnPlayerText(playerid, text[])
{
if (strfind(text, "hello") != -1)
{
SetTimerEx("greeting", 1000, false, "d", playerid);
}
if (strfind(text, "hi") != -1)
{
SetTimerEx("greeting", 1000, false, "d", playerid);
}
if (strfind(text, "watsup") != -1)
{
SetTimerEx("greeting", 1000, false, "d", playerid);
}
if (strfind(text, "sup") != -1)
{
SetTimerEx("greeting", 1000, false, "d", playerid);
}
if (strfind(text, "Wheres a good place to eat?") || strfind(text, "I'm Hungry") || strfind(text, "where can i get something to eat")|| strfind(text, "what do you reccomend for food?")!= -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;
}
public greeting(playerid)
{
if(IsPlayerNPC(playerid)) return 1;
SendPlayerMessageToPlayer(playerid,0,"Hi,I'm Dave; How can I help you?");
return 1;
}
Reply
#2

Put the whole code in pawn and /pawn tags (put them between []) in the future to help it be more legible.

And can you explain a little more what the issue is?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)