12.09.2009, 13:28
You'll need sscanf, and you don't need 256 cells, use 128.
pawn Код:
dcmd_say(playerid, params[])
{
new message[128], string[128], name[MAX_PLAYER_NAME];
if (sscanf(params, "s", message)) SendClientMessage(playerid, COLOR_WHITE, "SYNTAX - /say [message]");
else
{
if(IsPlayerAdmin(playerid))
{
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "RCON Admin %s: %s.", name, message); // You will probably want to re-format this.
SendClientMessageToAll(COLOR_ORANGE, string);
}
else
{
SendClientMessage(playerid, COLOR_ORANGE, "You're not an RCON administrator.");
}
return 1;
}
}