SendClientMessageF Macro
#2

pawn Код:
new
    FALSE = 0;
pawn Код:
#define SendClientMessageEx(%0,%1,%2,%3) \
do \
{ \
  new \
      string[128]; \
  if(strlen(%2) > 0) \
  { \
    format(string, sizeof(string), %2, %3); \
    SendClientMessage(%0, %1, string); \
  } \
} \
while(FALSE)
pawn Код:
// example with formatting:
new
    name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
SendClientMessageEx(playerid, 0xFFFFFFAA, "Your name is %s", name)
pawn Код:
// example without formatting:
SendClientMessageEx(playerid, 0xFFFFFFAA, "Hello.", 0)
Reply


Messages In This Thread
SendClientMessageF Macro - by un4seen - 04.12.2009, 14:23
Re: SendClientMessageF Macro - by Correlli - 04.12.2009, 14:28
Re: SendClientMessageF Macro - by un4seen - 04.12.2009, 14:30
Re: SendClientMessageF Macro - by bogeymanEST - 04.12.2009, 14:32

Forum Jump:


Users browsing this thread: 1 Guest(s)