[Tutorial] How to make a simple Search system
#4

Quote:
Originally Posted by DTV
View Post
This is my first tutorial, I hope you like it
pawn Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/mycommand", cmdtext, true, 10) == 0)
    {
        // Do something here
        return 1;
    }
    return 0;
}

CMD:search(playerid, params[]) //This is stating what the command will be named between the "CMD:" and "(", in this case, it's 'search'.
{
    SetTimerEx("SearchSystem", 5000, false, "i", playerid);  //This is the timer that will go off for the player when he types the command in.
    GameTextForPlayer(playerid, "Searching...", 4500, 3); //A message that will appear on the screen, showing that it's working.
    return 1;
}
NEVER return 0 under OnPlayerCommandText if you're using zcmd. It will not work correctly.
Return 1 or remove the OnPlayerCommandText callback.
Reply


Messages In This Thread
How to make a simple Search system - by DTV - 16.09.2014, 22:08
Re: How to make a simple Search system - by Mrashad - 17.09.2014, 11:16
Re: How to make a simple Search system - by Rudy_ - 17.09.2014, 12:27
Re: How to make a simple Search system - by Stinged - 17.09.2014, 12:31
Re: How to make a simple Search system - by TheRaGeLord - 16.01.2015, 10:29
Re: How to make a simple Search system - by ikkentim - 16.01.2015, 10:37
Re: How to make a simple Search system - by Schneider - 16.01.2015, 12:34
Re: How to make a simple Search system - by Rufio - 18.01.2015, 11:02

Forum Jump:


Users browsing this thread: 3 Guest(s)