[Question] How to do SendFormattedMessage in PAWN?
#10

Hm... it seems that it works if I do
pawn Код:
stock SendFormattedMessage_(playerid, colour = -1, string_[] = "", str_ = sizeof(string_), const fmat[] = "", {Float, _}:...) {
    va_format(string_, str_, fmat, va_start<5>);
    return (playerid != -1)? SendClientMessage(playerid, colour, fmat): SendClientMessageToAll(colour, fmat);
}
and
pawn Код:
SendFormattedMessage_(playerid, .fmat = "b");
in
pawn Код:
OnPlayerConnect
everything is okay. But if I do
pawn Код:
new str___[128];
SendFormattedMessage_(playerid, -1, str___, sizeof(str___), "%s test", PlayerName(playerid));
in
pawn Код:
OnPlayerConnect
too, it crash my server.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)