Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - pds2k12

Pages: [1]
1
Snippet Showroom / 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]

Pages: [1]