31.05.2009, 17:32
Assuming you have DCMD and SSCANF defined:
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...
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;
}
EDIT: Not sure about getting tied down in projects, I mean, I've been helping people here for ages now anyway...

