Author Topic: Sending Formatted Messages, Easiest Way.  (Read 3963 times)

0 Members and 1 Guest are viewing this topic.

Offline pds2k12

  • Street Thug
  • *
  • Posts: 1
    • View Profile
Sending Formatted Messages, Easiest Way.
« on: May 14, 2014, 01:55:17 am »
A way to send formatted messages without making long codes, just 1 line and its done. I came from sa-mp coding PAWN and just sharing my knowledge.

[pawn]

static stock
   fmat[ 144 + 1 ];
      //MsgF( playerid, colour, string[], arguments );
#define MsgF(%0,%1,%2,%3) \
   format(fmat, sizeof(fmat), %2, %3); SendClientMessage(%0,%1,fmat)
        //MsgAllF( colour, string[], arguments );
#define MsgAllF(%0,%1,%2) \
   format(fmat, sizeof(fmat), %1, %2); SendClientMessage(%0,%1,fmat)
[/pawn]

Offline NeskWriter

  • Crime Boss
  • ****
  • Posts: 355
    • View Profile
Re: Sending Formatted Messages, Easiest Way.
« Reply #1 on: May 14, 2014, 09:26:18 pm »
Welcome, sa-mp coder


-Funniest quotes-

Quote from: asad3man
i cant able to understand

Offline SaadNaeem

  • Street Thug
  • *
  • Posts: 16
    • View Profile
Re: Sending Formatted Messages, Easiest Way.
« Reply #2 on: May 16, 2014, 01:32:21 pm »

Crdits Myself