14.03.2018, 07:23
You need to pass the string size in sscanf.
PHP код:
CMD:me(playerid, params[])
{
new string[256], msg[256];
if(sscanf(params, "s[256]", msg)) return SendClientMessage(playerid,COLOR_RED, "SYNTAX: /me <text>");
format(string, sizeof(string), "%s %s", GetName(playerid), msg);
SendClientMessageToAll(COLOR_PURPLE, string);
return 1;
}
PHP код:
CMD:do(playerid, params[])
{
new string[256], msg[256];
if(sscanf(params, "s[256]", msg)) return SendClientMessage(playerid,COLOR_RED, "SYNTAX: /do <text>");
format(string, sizeof(string), "%s. ((%s))", msg, GetName(playerid));
SendClientMessageToAll(COLOR_PURPLE, string);
return 1;
}