[Include] H_Format - Format option in functions
#2

Do this:

pawn Код:
#define MAX_STRING                                  1000

new FormatString[MAX_STRING];

#define Format(%0)                                  (format(FormatString, MAX_STRING, %0), FormatString)

#define SendClientMessagef(%0,%1,%2)                SendClientMessage(%0, %1, Format(%2))
#define SendClientMessageToAllf(%0,%1)              SendClientMessageToAll(%0, Format(%1))
#define SetGameModeTextf(%0)                        SetGameModeText(Format(%0))
#define UpdatePlayer3DTextLabelTextf(%0,%1,%2,%3)   UpdatePlayer3DTextLabelText(%0, %1, %2, Format(%3))
#define Update3DTextLabelTextUpdatef(%0,%1,%2)      3DTextLabelText(%0, %1, Format(%2))
#define TextDrawSetStringf(%0,%1)                   TextDrawSetString(%0, Format(%1))
#define SetPVarStringf(%0,%1,%2)                    SetPVarString(%0, %1, Format(%2))
Alot simpler.
Reply


Messages In This Thread
H_Format - Format option in functions - by [LoD]Hauke - 01.10.2012, 21:10
Re: H_Format - Format option in functions - by Sniper Kitty - 02.10.2012, 02:44
Re: H_Format - Format option in functions - by Ballu Miaa - 02.10.2012, 15:58
Re: H_Format - Format option in functions - by Roel - 03.10.2012, 18:46
Re: H_Format - Format option in functions - by Sniper Kitty - 03.10.2012, 18:52
Re: H_Format - Format option in functions - by Roel - 03.10.2012, 19:07

Forum Jump:


Users browsing this thread: 1 Guest(s)