30.12.2013, 13:29
Quote:
i'll do you better -> https://sampforum.blast.hk/showthread.php?tid=166680
|
Pawn code
pawn Код:
#include <a_samp>
#define Create.%0(%1) \
new %0[%1]
main()
{
Create.string(128);
new pds2k12 = 60 * 10 / 5;
format(string, sizeof(string), "60 x 10 ч 5 = %i", pds2k12);
print(string);
}
pawn Код:
60 x 10 ч 5 = 120
EDIT: lets go hard if you don't believe.
Pawn Code
pawn Код:
#include <a_samp>
#define Create.%0(%1) \
new %0[%1]
main()
{
new StartTick = GetTickCount();
Create.string(128);
printf("Took %i ms to create a string", GetTickCount() - StartTick);
new StartTick1 = GetTickCount();
new pds2k12 = 60 * 10 / 5;
format(string, sizeof(string), "60 x 10 ч 5 = %i", pds2k12);
print(string);
printf("Took %i ms to execute the string & variable", GetTickCount() - StartTick1);
}
Код:
Took 0 ms to create a string 60 x 10 ч 5 = 120 Took 1 ms to execute the string & variable