Need help with creating function
#4

Quote:
Originally Posted by Alby Fire
Посмотреть сообщение
pawn Код:
new
    str[150];
#define SendFormattedMessage(%1,%2,%3,%4); \
format(str, sizeof str, %3, %4); \
SendClientMessage(%1, %2, str);
Example
pawn Код:
new
    a = 3;
SendFormattedMessage(playerid, 0xffffffff, "Hello this is a formatted message look -> %d", a);
If you don't know how to use a function, I don't think you can create it correctly.
Can this handle more than one argument then?

(eg SendFormattedMessage(playerid, hex, "Test %s - you have %i", name, score);
Reply


Messages In This Thread
Need help with creating function (SOLVED) - by Johnson_boy - 23.04.2011, 09:12
Re: Need help with creating function - by Ash. - 23.04.2011, 09:16
Re: Need help with creating function - by Alby Fire - 23.04.2011, 09:18
Re: Need help with creating function - by Ash. - 23.04.2011, 09:25
Re: Need help with creating function - by Johnson_boy - 23.04.2011, 09:30
Re: Need help with creating function - by Ash. - 23.04.2011, 09:31
Re: Need help with creating function - by [ADC]Aldi96 - 23.04.2011, 09:37
Re: Need help with creating function - by Nanory - 24.04.2011, 10:35

Forum Jump:


Users browsing this thread: 1 Guest(s)