Get It Done Right
#2

Assuming you have DCMD and SSCANF defined:

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    dcmd(command, 7, cmdtext);
    return 0;
}
   
dcmd_command(playerid, params[])
{
    new
        name[MAX_PLAYER_NAME],
        string[128];
    if (sscanf(params, "s", string)) SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/command <string>\"");
    else
    {
        GetPlayerName(playerid, name, sizeof(name));
        format(string, sizeof(string), "%s typed: %s", name, string);
        SendClientMessageToAll(0xFF00FFFF, string);
    }
    return 1;
}
Indentation fixed, curse you pawn box!

EDIT: Not sure about getting tied down in projects, I mean, I've been helping people here for ages now anyway...
Reply


Messages In This Thread
Get It Done Right - by Daren_Jacobson - 31.05.2009, 16:13
Re: Get It Done Right - by Weirdosport - 31.05.2009, 17:32
Re: Get It Done Right - by Daren_Jacobson - 31.05.2009, 17:39
Re: Get It Done Right - by Weirdosport - 31.05.2009, 17:42
Re: Get It Done Right - by Daren_Jacobson - 31.05.2009, 17:49
Re: Get It Done Right - by yom - 31.05.2009, 18:08
Re: Get It Done Right - by Weirdosport - 31.05.2009, 18:33
Re: Get It Done Right - by Djiango - 31.05.2009, 18:41
Re: Get It Done Right - by Weirdosport - 31.05.2009, 19:02
Re: Get It Done Right - by Daren_Jacobson - 31.05.2009, 19:20

Forum Jump:


Users browsing this thread: 1 Guest(s)