14.01.2012, 13:52
Max chat string is about 150 (since 0.3c). There is no need of using 256.
Also, sscanf returns 0 on success, therefore you don't do "!sscanf."
Which version of sscanf are you using? You're probably not using the newest since you put strings without string size. Use the newest sscanf, find it with the "search" feature.
pawn Код:
COMMAND:o(playerid, params[])
{
new text[150];
if(sscanf(params, "s[150]", text))
{
new name[MAX_PLAYER_NAME], string[150];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(text), "%s: [[%s]] ", name, text);
SendClientMessageToAll(COLOR_WHITE, string);
return 1;
}
else return SendClientMessage(playerid, COLOR_RED, "USAGE: /o [Text]");
}
Which version of sscanf are you using? You're probably not using the newest since you put strings without string size. Use the newest sscanf, find it with the "search" feature.