10.06.2016, 18:33
Hola amigos, me preguntaba donde puedo conseguir la funciуn de SendClientMessageEx ya que no la consigo que solo sea un stock sin includes de mбs por que no quiero estar definiendo cada string para usar el format
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; }
stock SendClientMessageEx(playerid, color, const text[], {Float, _}:...) { static args, str[144]; if ((args = numargs()) == 3) { SendClientMessage(playerid, color, text); } else { while (--args >= 3) { #emit LCTRL 5 #emit LOAD.alt args #emit SHL.C.alt 2 #emit ADD.C 12 #emit ADD #emit LOAD.I #emit PUSH.pri } #emit PUSH.S text #emit PUSH.C 144 #emit PUSH.C str #emit PUSH.S 8 #emit SYSREQ.C format #emit LCTRL 5 #emit SCTRL 4 SendClientMessage(playerid, color, str); #emit RETN } return 1; }