21.12.2013, 13:15
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.
EDIT
You could use that but it would not show you any message how to use the command.
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;
}
You could use that but it would not show you any message how to use the command.