one command multiple actions. (/goto [Location] (LS LV SF))
#3

I am using y_stringhash & y_commands because it's easier for you, instead of using strcmp to compare strings, nothing special in this code.

pawn Код:
YCMD:goto(playerid, params[], help)
{
    if(help)
    {
        SendClientMessage(playerid, -1, "SF | LS | LV");
        SendClientMessage(playerid, -1, "/goto [Location");
    }
    switch ( YHash( params ), false ) //parameter | YHash(str[], bool:sensitive = true, e_HASH_TYPE:type = bernstein);
    {
        case _H<LS>:
        {
            //ls coordinates.
        }
        case _H<LV>:
        {
            //lv coordinates.
        }
        case _H<SF>:
        {
            //sf coordinates.
        }
    }

    return 1;
}
EDIT

Quote:
Originally Posted by newbie scripter
Посмотреть сообщение
pawn Код:
//code
You could use that but it would not show you any message how to use the command.
Reply


Messages In This Thread
one command multiple actions. (/goto [Location] (LS LV SF)) - by Verth - 21.12.2013, 13:04
Re: one command multiple actions. (/goto [Location] (LS LV SF)) - by newbie scripter - 21.12.2013, 13:14
Re: one command multiple actions. (/goto [Location] (LS LV SF)) - by Patrick - 21.12.2013, 13:15
Re: one command multiple actions. (/goto [Location] (LS LV SF)) - by Verth - 21.12.2013, 13:41

Forum Jump:


Users browsing this thread: 1 Guest(s)