Other way of making cmds
#3

You want a sscanf and ZCMD tutorial? It's quite easy. I'll teach you how I learned;

Read this thread to learn about sscanf.

Read this thread to learn about zcmd.

pawn Код:
COMMAND:commandname(playerid, params[])
{
    new
        NumberSentToTheUser,
        User,
        string[128];
       
    if(sscanf(params, "ui", User, NumberSentToTheUser))
    {
        new
            YourName[MAX_PLAYER_NAME];

        GetPlayerName(playerid, YourName, sizeof(YourName));
        format(string, sizeof(string), "{FFFFFF}%s has sent you the following number: %d.", YourName);
        SendClientMessage(User, -1, string);
    }
    else return 1; //Not the correct syntax (Usage message?)
    return 1;
}
Study that command.
Reply


Messages In This Thread
Other way of making cmds - by Tachibana - 31.05.2011, 18:59
Re: Other way of making cmds - by Elka_Blazer - 31.05.2011, 19:59
Re: Other way of making cmds - by Skylar Paul - 31.05.2011, 20:01
Re: Other way of making cmds - by Tachibana - 31.05.2011, 20:07

Forum Jump:


Users browsing this thread: 1 Guest(s)