[HELP]Little doubt with sscanf.
#6

Quote:
Originally Posted by Calgon
Посмотреть сообщение
You can do it with sscanf, but it's pointless. You only have a single string. It's wise to use sscanf to split multiple variables, and you clearly didn't know about the 'params' with strcmp in zcmd.
I could make it with strcmp by myself, but I thought with sscanf it's more optimized. lol
Thanks anyway.
pawn Код:
//I know about strcmp in zcmd. ;)
COMMAND:help (playerid, params[])
{
    if(isnull(params))
    {
        //info about help options. xd
        return 1;
    }
    if(strcmp(params,"lol1",true) == 0)
    {
       //lalala
    }
    else if(strcmp(params,"lol2",true) == 0)
    {
        //lsgds
    }
    else if(strcmp(params,"lol3",true) == 0)
    {
        //aham xd
    }
    else SendClientMessage(playerid,-1,"etc... etc...");
    return 1;
}
//xD
Reply


Messages In This Thread
[HELP]Little doubt with sscanf. - by [DOG]irinel1996 - 17.12.2011, 16:38
Re: [HELP]Little doubt with sscanf. - by Ash. - 17.12.2011, 16:57
Re: [HELP]Little doubt with sscanf. - by Calgon - 17.12.2011, 17:00
Respuesta: [HELP]Little doubt with sscanf. - by [DOG]irinel1996 - 17.12.2011, 17:17
Re: [HELP]Little doubt with sscanf. - by Calgon - 17.12.2011, 18:13
Respuesta: Re: [HELP]Little doubt with sscanf. - by [DOG]irinel1996 - 17.12.2011, 19:08

Forum Jump:


Users browsing this thread: 1 Guest(s)