24.06.2014, 22:52
(
Последний раз редактировалось Juvanii; 24.06.2014 в 23:27.
)
Quote:
fixes 2
pawn Код:
|
Example:
pawn Код:
CMD:say(playerid, params[])
{
new text[50];
if(sscanf(params, "s[50]", text))return SendClientMessage(playerid, COLOR_WHITE, "/say [text]");
SendClientMessageToAll(COLOR_GREEN, text);
return 1;
}
Just Like: /say "text above 50 letters"
Message would be like:
the text that above 50 letters.
Please type something shorter.
Note: I'm using it as a loop as far as gLastPlayer is not defined.
pawn Код:
public OnServerMessage(const msg[])
{
if (!strcmp(msg, "sscanf warning: ", false, 16))
{
if (!strcmp(msg[16], "String buffer overflow."))
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
SendClientMessage(i, COLOR_RED, "Please type something shorter");
}
}
}
}