10.06.2016, 18:44
Код:
new easy_FALSE = false; #define SCMF(%0,%1,%2,%3) \ do \ { new STRING[145]; \ format(STRING, sizeof(STRING), %2, %3); \ SCM(%0, %1, STRING); \ } \ while(easy_FALSE) #define SCMTAF(%0,%1,%2) \ do \ { new STRING[145]; \ format(STRING, sizeof(STRING), %1, %2); \ SendClientMessageToAll(%0, STRING); \ } \ while(easy_FALSE) #define GTFPF(%0,%1,%2,%3,%4) \ do \ { new STRING[145]; \ format(STRING, sizeof(STRING), %1, %4); \ FixTildes(STRING); \ GameTextForPlayer(%0, STRING, %2, %3); \ } \ while(easy_FALSE) #define GTFAF(%0,%1,%2,%3) \ do \ { new STRING[145]; \ format(STRING, sizeof(STRING), %0, %3); \ FixTildes(STRING); \ GameTextForAll(STRING, %1, %2); \ } \ while(easy_FALSE) #define SPDF(%0,%1,%2,%3,%4,%5,%6,%7) \ do \ { new STRING[145]; \ format(STRING, sizeof(STRING), %4, %7); \ FixTildes(STRING); \ ShowPlayerDialog(%0, %1, %2, %3, STRING, %5, %6); \ } \ while(easy_FALSE)
Код:
stock FixTildes(stringtextdraw[]) { new original[50] = {192,193,194,196,198,199,200,201,202,203,204,205,206,207,210,211,212,214,217,218,219,220,223,224,225,226,228,230,231,232,233,234,235,236,237,238,239,242,243,244,246,249,250,251,252,209,241,191,161,176}; new fixed[50] = {128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,94,124}; new len = strlen(stringtextdraw); for (new i; i < len; i++) { for(new j;j < 50;j++) { if(stringtextdraw[i] == original[j]) { stringtextdraw[i] = fixed[j]; break; } } } return true; }