command help
#4

pawn Код:
CMD:yourcmd(playerid, params[])
{
    new choice[32];
    if(sscanf(params, "s[32]", choice))
    {
        SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /yourcmd [name]");
        SendClientMessageEx(playerid, COLOR_GREY, "Available names: optinon1, option2");
        return 1;
    }

    if(strcmp(choice, "option1", true) == 0)
    {
        // Your code
        return 1;
    }
    else if(strcmp(choice, "option2", true) == 0)
    {
        // Your code
        return 1;
    }
    return 1;
}
maybe you want something like this
Reply


Messages In This Thread
command help - by Amine_Mejrhirrou - 25.11.2012, 16:22
Re: command help - by Channeru - 25.11.2012, 16:25
Re: command help - by Nordic - 25.11.2012, 16:26
Re: command help - by RenSoprano - 25.11.2012, 16:31
Re : command help - by Amine_Mejrhirrou - 25.11.2012, 16:37
Re: command help - by RenSoprano - 25.11.2012, 16:40
Re: command help - by Nordic - 25.11.2012, 16:42

Forum Jump:


Users browsing this thread: 1 Guest(s)