Format text directly into "SendClientMessage" ?
#4

Quote:
Originally Posted by zaibaslr2
Посмотреть сообщение
Actually I have a very good define for that:
Код:
new g_szBuffer[10000 char];
#define form(%0) (format(g_szBuffer, sizeof g_szBuffer, %0), g_szBuffer)
Then use it like this:
Код:
SendClientMessage(playerid,-1,form("You have %d money",money));
I'm a bit unsure about this:
pawn Код:
"new g_szBuffer[10000 char];
^ Isn't that the same as defining a new string with lenght: 1000 ?
It would use a lot of unnecessary memory; or am i wrong?

Thanks anyway for your replies.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)