06.08.2014, 06:17
Alrighty then, I have a /say command for admins, but the problem is that when I enter more than 117 characters to the message, it won't appear in the server. This is the command, how can I fix it?
If possible, I'd like to know how to cut it off to two lines if string is long.
pawn Код:
COMMAND:say(playerid, params[])
{
if(isPlayerAdmin(playerid) >= 1)
{
new message[256];
if(!sscanf(params, "s[256]", message))
{
new adminname[MAX_PLAYER_NAME+1];
GetPlayerName(playerid, adminname, sizeof(adminname));
format(message, sizeof(message), "Administrator %s (%d): %s", adminname, playerid, message);
return SendClientMessageToAll(0xB8860BAA, message);
}
else SendClientMessage(playerid, -1, "USAGE: /say <message>");
}
else SendClientMessage(playerid, 0xFFFF0000, "ERROR: Insufficient permission!");
return 1;
}