CMD:todo(playerid, params[])
{
new
text[21],
space[2],
action[31];
if(sscanf(params
, "s[21]s[2]s[31]", text
, space
, action
)) return SCM(playerid, COLOR_YELLOW, !"Образец отыгровки фразы с действием: /todo [phrase] * [action]");
return SCM(playerid, COLOR_YELLOW, !"Образец отыгровки фразы с действием: /todo [phrase] * [action]");
if(text[20] != EOS)
return SCM(playerid, COLOR_YELLOW, !"Максимальная длина реплики в /todo: 20 символов!");
if(action[30] != EOS)
return SCM(playerid, COLOR_YELLOW, !"Максимальная длина действия в /todo: 30 символов!");
return SCM(playerid, COLOR_YELLOW, !"Минимальная длина фразы в /todo: 2 символа!");
return SCM(playerid, COLOR_YELLOW, !"Минимальная длина действия в /todo: 2 символа!");
static const
fmt_str[] = "'%s' - сказал%s %s, %s";
new
str[sizeof(fmt_str)-6+MAX_PLAYER_NAME+30+20+1+1];
format(str
, sizeof(str
), fmt_str
, text
, (player
[playerid
][pSex
] == 1) ? ("") : ("а"), GetName
(playerid
), action
);
ProxDetector(playerid, 20.0, COLOR_ACTION, str);
return true;
}