Vice City Multiplayer

VC:MP 0.3 => mIRC/pawn Scripting => Snippet Showroom => Topic started by: pds2k12 on May 14, 2014, 01:55:17 am

Title: Sending Formatted Messages, Easiest Way.
Post by: pds2k12 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]
Title: Re: Sending Formatted Messages, Easiest Way.
Post by: NeskWriter on May 14, 2014, 09:26:18 pm
Welcome, sa-mp coder
Title: Re: Sending Formatted Messages, Easiest Way.
Post by: SaadNaeem on May 16, 2014, 01:32:21 pm
Welcome, sa-mp coder