JokerSAMP

Untitled

Dec 8th, 2017
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 16.21 KB | None | 0 0
  1. #include <a_samp>
  2. #include <YSI\y_ini>
  3. #include <zcmd>
  4. #include <YSI\y_inline>
  5. #define Callback:%0(%1) forward %0(%1); public %0(%1)
  6. #define DIALOGO_REGISTRO (1)
  7. #define DIALOGO_INGRESO  (2)
  8. #define DIALOGO_NORMAL   (3)
  9. #define rutaUsuarios "/Cuentas/%s.ini"
  10. #define blanco              "{FDFDFE}"
  11. #define azul                "{0256FD}"
  12. #define verde               "{06FA1F}"
  13. #define rojo                "{FF0000}"
  14.  
  15. enum datosdeUsuario
  16. {
  17.     cLlave[34],
  18.     cDinero,
  19.     cAsesinatos,
  20.     cMuertes,
  21.     invisible,
  22.     score,
  23.     cAdmin,
  24.     cVip,
  25.     cRegistrado
  26. }
  27. new cuentas[MAX_PLAYERS][datosdeUsuario];
  28. new pColor;
  29.  
  30. main(){}
  31.  
  32. public OnGameModeInit()
  33. {
  34.     if(!fexist("/cuentas"))
  35.     {
  36.         printf("El directorio \"cuentass\" de Scriptfiles no existe, debe crearla antes de prender el servidor.");
  37.         SendRconCommand("exit");
  38.     }
  39.     else
  40.     {
  41.         printf("cuentas cargadas correctamente.");
  42.     }
  43.     return 1;
  44. }
  45.  
  46. public OnGameModeExit()
  47. {
  48.     for(new i=0;i<MAX_PLAYERS;i++)
  49.     {
  50.         if(IsPlayerConnected(i) && fexist(Checarcuentas(i)))
  51.         {
  52.             Guardarcuentas(i);
  53.             SendClientMessageEx(-1,-1,"Las cuentass fueron guardadas correctamente.");
  54.             printf("cuentass guardadas correctamente.");
  55.         }
  56.     }
  57.     y_inline();
  58.     return 1;
  59. }
  60.  
  61. public OnPlayerConnect(playerid)
  62. {
  63.     ReiniciarDatos(playerid);
  64.     if(fexist(Checarcuentas(playerid)))
  65.     {
  66.         INI_ParseFile(Checarcuentas(playerid),"LoadUser_%s",.bExtra = true, .extra = playerid);
  67.         ShowPlayerDialog(playerid,DIALOGO_INGRESO,DIALOG_STYLE_PASSWORD,"{FFFFFF}Inicio de sesion","{FFFFFF}Escribe en el siguiente campo tu contraseña para poder iniciar sesion.","Aceptar","");
  68.     }
  69.     else
  70.     {
  71.         ShowPlayerDialog(playerid,DIALOGO_REGISTRO,DIALOG_STYLE_INPUT,"{FFFFFF}Registro de cuentas","{FFFFFF}Escriba la contraseña que desea para registrar su cuentas.","Aceptar","");
  72.     }
  73.     return 1;
  74. }
  75.  
  76. public OnPlayerDisconnect(playerid)
  77. {
  78.     if(fexist(Checarcuentas(playerid)))
  79.     {
  80.         Guardarcuentas(playerid);
  81.         SendClientMessage(playerid,-1,"Sus datos fueron guardados.");
  82.         printf("La cuenta \"%s\" fue guardada correctamente.",Nombre(playerid));
  83.     }
  84.     return 1;
  85. }
  86.  
  87. public OnDialogResponse(playerid,dialogid,response,listitem,inputtext[])
  88. {
  89.     if(dialogid == DIALOGO_REGISTRO)
  90.     {
  91.     if(!response)return SetTimerEx("KickearJugador",1000,false,"i",playerid) && ShowPlayerDialog(playerid,DIALOGO_NORMAL,DIALOG_STYLE_MSGBOX,"{FFFFFF}Expulsado","{FFFFFF}Fuistes expulsado por evadir el Registro.","Aceptar","");
  92.     if(response)
  93.     {
  94.         if(!strlen(inputtext))return ShowPlayerDialog(playerid,DIALOGO_REGISTRO,DIALOG_STYLE_INPUT,"{FFFFFF}Registro de cuentas","{FFFFFF}Escriba la contraseña que desea para registrar su cuentas.","Aceptar","");
  95.         new pw[34];
  96.         format(pw,sizeof(pw),"%s",inputtext);
  97.         cuentas[playerid][cLlave] = pw;
  98.         new INI:File = INI_Open(Checarcuentas(playerid));
  99.         INI_SetTag(File,"data");
  100.         INI_WriteString(File,"Contraseña",inputtext);
  101.         INI_Close(File);
  102.         cuentas[playerid][cAdmin]      = 0;
  103.         cuentas[playerid][cVip]        = 0;
  104.         cuentas[playerid][cDinero]     = 0;
  105.         cuentas[playerid][cRegistrado] = 1;
  106.         SendClientMessageEx(playerid,-1,"%s ahora estas registrado en el servidor.",Nombre(playerid));
  107.         }
  108.     }
  109.     if(dialogid == DIALOGO_INGRESO)
  110.     {
  111.     if(!response)return SetTimerEx("KickearJugador",1000,false,"i",playerid) && ShowPlayerDialog(playerid,DIALOGO_NORMAL,DIALOG_STYLE_MSGBOX,"{FFFFFF}Expulsado","{FFFFFF}Fuistes expulsado por intentar evadir contraseña.","Aceptar","");
  112.     if(response)
  113.     {
  114.         if(strcmp(inputtext,cuentas[playerid][cLlave], true) == 0)
  115.         {
  116.         INI_ParseFile(Checarcuentas(playerid),"LoadUser_%s",.bExtra = true, .extra = playerid);
  117.         SendClientMessage(playerid,-1,"Has ingresado a tu cuentas correctamente.");
  118.         }
  119.         else return SetTimerEx("KickearJugador",1000,false,"i",playerid) && ShowPlayerDialog(playerid,DIALOGO_NORMAL,DIALOG_STYLE_MSGBOX,"{FFFFFF}Expulsado","{FFFFFF}Fuistes expulsado por ingresar una contraseña incorrecta.","Aceptar","");
  120.         }
  121.     }
  122.     return 1;
  123. }
  124.  
  125.  
  126. public OnPlayerUpdate(playerid)
  127. {
  128.     if(GetPlayerMoney(playerid) != cuentas[playerid][cDinero])
  129.     {
  130.         ResetPlayerMoney(playerid);
  131.         GivePlayerMoney(playerid,cuentas[playerid][cDinero]);
  132.     }
  133.     if(GetPlayerScore(playerid) != cuentas[playerid][score])
  134.     {
  135.         SetPlayerScore(playerid,cuentas[playerid][score]);
  136.     }
  137.     return 1;
  138. }
  139.  
  140. Callback:LoadUser_data(playerid,name[],value[])
  141. {
  142. INI_String("Contraseña",cuentas[playerid][cLlave],34);
  143. INI_Int("Dinero",cuentas[playerid][cDinero]);
  144. INI_Int("Asesinatos",cuentas[playerid][cAsesinatos]);
  145. INI_Int("Muertes",cuentas[playerid][cMuertes]);
  146. INI_Int("Admin",cuentas[playerid][cAdmin]);
  147. INI_Int("Vip",cuentas[playerid][cVip]);
  148. return 1;
  149. }
  150.  
  151. Callback:KickearJugador(playerid)
  152. {
  153.     Kick(playerid);
  154.     return 1;
  155. }
  156.  
  157. stock Nombre(playerid)
  158. {
  159.     new uNombre[32];
  160.     GetPlayerName(playerid,uNombre,100);
  161.     return uNombre;
  162. }
  163.  
  164. stock Checarcuentas(playerid)
  165. {
  166.     new cuenta[146];
  167.     format(cuenta,sizeof(cuenta),rutaUsuarios,Nombre(playerid));
  168.     return cuenta;
  169. }
  170.  
  171. stock Guardarcuentas(playerid)
  172. {
  173.     new INI:File = INI_Open(Checarcuentas(playerid));
  174.     INI_SetTag(File,"data");
  175.     INI_WriteString(File,"Contraseña",cuentas[playerid][cLlave]);
  176.     INI_WriteInt(File,"Dinero",cuentas[playerid][cDinero]);
  177.     INI_WriteInt(File,"Asesinatos",cuentas[playerid][cAsesinatos]);
  178.     INI_WriteInt(File,"Muertes",cuentas[playerid][cMuertes]);
  179.     INI_WriteInt(File,"Admin",cuentas[playerid][cAdmin]);
  180.     INI_WriteInt(File,"Vip",cuentas[playerid][cVip]);
  181.     INI_WriteInt(File,"Registrado",cuentas[playerid][cRegistrado]);
  182.     INI_Close(File);
  183. }
  184.  
  185. stock ReiniciarDatos(playerid)
  186. {
  187.     cuentas[playerid][cDinero]     = 0;
  188.     cuentas[playerid][cAsesinatos] = 0;
  189.     cuentas[playerid][cMuertes]    = 0;
  190.     cuentas[playerid][cAdmin]      = 0;
  191.     cuentas[playerid][cVip]        = 0;
  192.     cuentas[playerid][cRegistrado] = 0;
  193. }
  194.  
  195. CMD:invisible(playerid, params[])
  196. {
  197.     if(cuentas[playerid][invisible] == 1)
  198.     {
  199.         return SendClientMessage(playerid, -1,""rojo"» "blanco"Ya estas en modo invisible.");
  200.     }
  201.     pColor = GetPlayerColor(playerid);
  202.     SetPlayerColor(playerid, 0xFFFFFF00);
  203.     GameTextForPlayer(playerid, "~g~Invisible",3000,3);
  204.     cuentas[playerid][invisible] = 1;
  205.     PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
  206.     if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  207.     {
  208.         LinkVehicleToInterior(GetPlayerVehicleID(playerid),GetPlayerInterior(playerid));
  209.     }
  210.     return 1;
  211. }
  212.  
  213. CMD:visible(playerid, params[])
  214. {
  215.     if(cuentas[playerid][invisible] == 0)
  216.     {
  217.         return SendClientMessage(playerid, -1,""rojo"» "blanco"Ya estas en modo visible.");
  218.     }
  219.  
  220.     SetPlayerColor(playerid, pColor);
  221.     GameTextForPlayer(playerid, "~b~Visible",3000,3);
  222.     cuentas[playerid][invisible] = 0;
  223.     PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
  224.     if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  225.     {
  226.         LinkVehicleToInterior(GetPlayerVehicleID(playerid),GetPlayerInterior(playerid));
  227.     }
  228.     return 1;
  229. }
  230.  
  231. CMD:darvida(playerid, params[])
  232. {
  233.     if(! esadmin(playerid, 2)) return 1;
  234.     new player1, Float:vida;
  235.     if(CheckSplit(params, "uf", player1, vida))
  236.     {
  237.         return  SendClientMessage(playerid, -1, "» "verde"Modo de uso: "blanco"/DARVIDA [ID] [CANTIDAD DE VIDA]") &&
  238.                 SendClientMessage(playerid, -1, "» "verde"Funcion: "blanco"Brindar vida a un jugador especifico.");
  239.     }
  240.     if(! checarconeccion(playerid, player1)) return 1;
  241.     if(! checarnivel(playerid, player1)) return 1;
  242.     SendClientMessageEx(playerid,-1,"» "azul"Fijaste la vida de %s a %02.f.", Nombre(player1), vida);
  243.     PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
  244.     if(player1 != playerid)
  245.     {
  246.         SendClientMessageEx(player1,-1,"» "verde"El administrador %s fijo tu vida en: "blanco"%02.f"verde".", Nombre(playerid), vida);
  247.         PlayerPlaySound(player1,1057,0.0,0.0,0.0);
  248.     }
  249.     SetPlayerHealth(player1, vida);
  250.     return 1;
  251. }
  252.  
  253. CMD:fijarscore(playerid, params[])
  254. {
  255.     if(! esadmin(playerid, 3)) return 1;
  256.     new player1;
  257.     if(CheckSplit(params, "ud", player1, score))
  258.     {
  259.         return  SendClientMessage(playerid, -1, "» "verde"Modo de uso: "blanco"/FIJARSCORE [ID] [CANTIDAD SCORE]") &&
  260.                 SendClientMessage(playerid, -1, "» "verde"Funcion: "blanco"Fijar el score a un jugador especifico.");
  261.     }
  262.     if(! checarconeccion(playerid, player1)) return 1;
  263.     if(! checarnivel(playerid, player1)) return 1;
  264.     SendClientMessageEx(playerid,-1,"» "azul"Fijaste el score de %s en %d.",Nombre(player1),score);
  265.     PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
  266.     if(player1 != playerid)
  267.     {
  268.         SendClientMessageEx(player1,-1,"» "verde"El administrador %s fijo tu score en: "blanco"%d"verde".", Nombre(playerid), score);
  269.         PlayerPlaySound(player1,1057,0.0,0.0,0.0);
  270.     }
  271.     cuentas[player1][score] = score;
  272.     SetPlayerScore(player1,cuentas[player1][score]);
  273.     return 1;
  274. }
  275.  
  276. CMD:darskin(playerid, params[])
  277. {
  278.     if(! esadmin(playerid, 3)) return 1;
  279.     new player1, skin;
  280.     if(CheckSplit(params, "ud", player1, skin))
  281.     {
  282.         return  SendClientMessage(playerid, -1, "» "verde"Modo de uso: "blanco"/DARSKIN [ID] [ID DE SKIN]") &&
  283.                 SendClientMessage(playerid, -1,"» "verde"Funcion: "blanco"Cambiar el skin a un jugador especifico.");
  284.     }
  285.     if(! checarconeccion(playerid, player1)) return 1;
  286.     if(! checarnivel(playerid, player1)) return 1;
  287.     if(skin < 0 || skin > 299)
  288.     {
  289.         return SendClientMessage(playerid, -1, ""rojo"» "blanco"ID de Skin invalido (0-299).");
  290.     }
  291.     SendClientMessageEx(playerid,-1,"» "azul"Fijaste el skin de %s a %d.", Nombre(player1), skin);
  292.     PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
  293.     if(player1 != playerid)
  294.     {
  295.         SendClientMessageEx(player1,-1,"» "verde"El administrador %s cambio tu skin por el skin ID: "blanco"%d"verde".", Nombre(playerid), skin);
  296.         PlayerPlaySound(player1,1057,0.0,0.0,0.0);
  297.     }
  298.     SetPlayerSkin(player1, skin);
  299.     return 1;
  300. }
  301.  
  302.  
  303. CMD:darchaleco(playerid, params[])
  304. {
  305.     if(! esadmin(playerid, 2)) return 1;
  306.     new player1, Float:chaleco;
  307.     if(CheckSplit(params, "uf", player1, chaleco))
  308.     {
  309.         return  SendClientMessage(playerid, -1, "» "verde"Modo de uso: "blanco"/DARCHALECO [ID] [CANTIDAD DE CHALECO]") &&
  310.                 SendClientMessage(playerid, -1, "» "verde"Funcion: "blanco"Brindar armadura a un jugador especifico.");
  311.     }
  312.     if(! checarconeccion(playerid, player1)) return 1;
  313.     if(! checarnivel(playerid, player1)) return 1;
  314.     SendClientMessageEx(playerid,-1,"» "azul"Fijaste el chaleco de %s a %02.f.", Nombre(player1), chaleco);
  315.     PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
  316.     if(player1 != playerid)
  317.     {
  318.         SendClientMessageEx(player1,-1,"» "verde"El administrador %s fijo tu chaleco en: "blanco"%02.f"verde".", Nombre(playerid), chaleco);
  319.         PlayerPlaySound(player1,1057,0.0,0.0,0.0);
  320.     }
  321.     SetPlayerArmour(player1, chaleco);
  322.     return 1;
  323. }
  324.  
  325. CMD:ip(playerid, params[])
  326. {
  327.     if(! esadmin(playerid, 1)) return 1;
  328.     new player1;
  329.     if(CheckSplit(params, "u", player1))
  330.     {
  331.         return  SendClientMessage(playerid, -1, "» "verde"Modo de uso: "blanco"/IP [ID]") &&
  332.                 SendClientMessage(playerid, -1, "» "verde"Funcion: "blanco"Ver la IP de un jugador.");
  333.     }
  334.     if(! checarconeccion(playerid, player1)) return 1;
  335.     if(! checarnivel(playerid, player1)) return 1;
  336.     new tmp3[50];
  337.     GetPlayerIp(player1,tmp3,50);
  338.     SendClientMessageEx(playerid,-1,"» "verde"Nombre: "blanco"%s "verde"IP: "blanco"%s.", Nombre(player1), tmp3);
  339.     return 1;
  340. }
  341.  
  342. stock checarconeccion(playerid, playerid2)
  343. {
  344.     if(! IsPlayerConnected(playerid2))
  345.     {
  346.         SendClientMessage(playerid,-1,""rojo"» "blanco"No esta conectado.");
  347.         return 0;
  348.     }
  349.     return 1;
  350. }
  351.  
  352.  
  353. stock esadmin(playerid, level)
  354. {
  355.     if(IsPlayerAdmin(playerid)) return 1;
  356.  
  357.     if(cuentas[playerid][cAdmin] < level)
  358.     {
  359.         SendClientMessage(playerid,-1,""rojo"» "blanco"No eres administrador.");
  360.         return 0;
  361.     }
  362.     return 1;
  363. }
  364.  
  365. stock checarnivel(playerid, playerid2)
  366. {
  367.     if(cuentas[playerid][cAdmin] < cuentas[playerid2][cAdmin])
  368.     {
  369.         SendClientMessage(playerid,-1,""rojo"» "blanco"El jugador especificado posee mayor nivel que tu.");
  370.         return 0;
  371.     }
  372.     return 1;
  373. }
  374.  
  375. stock CheckSplit(string[], format[], {Float,_}:...)
  376. {
  377.     if (string[0] == 0 || (string[0] == 1 && string[1] == 0))
  378.     {
  379.         return format[0];
  380.     }
  381.  
  382.     #pragma tabsize 4
  383.  
  384.     new
  385.         formatPos = 0,
  386.         stringPos = 0,
  387.         paramPos = 2,
  388.         paramCount = numargs(),
  389.         delim = ' ';
  390.  
  391.     while (string[stringPos] && string[stringPos] <= ' ')
  392.     {
  393.         stringPos++;
  394.     }
  395.  
  396.     while (paramPos < paramCount && string[stringPos])
  397.     {
  398.         switch (format[formatPos++])
  399.         {
  400.             case '\0':
  401.             {
  402.                 return 0;
  403.             }
  404.             case 'i', 'd':
  405.             {
  406.                 new
  407.                     neg = 1,
  408.                     num = 0,
  409.                     ch = string[stringPos];
  410.                 if (ch == '-')
  411.                 {
  412.                     neg = -1;
  413.                     ch = string[++stringPos];
  414.                 }
  415.                 do
  416.                 {
  417.                     stringPos++;
  418.                     if ('0' <= ch <= '9')
  419.                     {
  420.                         num = (num * 10) + (ch - '0');
  421.                     }
  422.                     else
  423.                     {
  424.                         return -1;
  425.                     }
  426.                 }
  427.                 while ((ch = string[stringPos]) > ' ' && ch != delim);
  428.                 setarg(paramPos, 0, num * neg);
  429.             }
  430.             case 'f':
  431.             {
  432.                 setarg(paramPos, 0, _:floatstr(string[stringPos]));
  433.             }
  434.             case '\'':
  435.             {
  436.                 new
  437.                     end = formatPos - 1,
  438.                     ch;
  439.                 while ((ch = format[++end]) && ch != '\'') {}
  440.                 if (!ch)
  441.                 {
  442.                     return -1;
  443.                 }
  444.                 format[end] = '\0';
  445.                 if ((ch = strfind(string, format[formatPos], false, stringPos)) == -1)
  446.                 {
  447.                     if (format[end + 1])
  448.                     {
  449.                         return -1;
  450.                     }
  451.                     return 0;
  452.                 }
  453.                 format[end] = '\'';
  454.                 stringPos = ch + (end - formatPos);
  455.                 formatPos = end + 1;
  456.             }
  457.             case 'u':
  458.             {
  459.                 new
  460.                     end = stringPos - 1,
  461.                     ie = 0,
  462.                     bool:num = true,
  463.                     ch;
  464.                 while ((ch = string[++end]) && ch != delim)
  465.                 {
  466.                     if (num)
  467.                     {
  468.                         if ('0' <= ch <= '9')
  469.                         {
  470.                             ie = (ie * 10) + (ch - '0');
  471.                         }
  472.                         else
  473.                         {
  474.                             num = false;
  475.                         }
  476.                     }
  477.                 }
  478.                 if (num && IsPlayerConnected(ie))
  479.                 {
  480.                     setarg(paramPos, 0, ie);
  481.                 }
  482.                 else
  483.                 {
  484.                     #if !defined foreach
  485.                         #define foreach(%1,%2) for (new %2 = 0; %2 < MAX_PLAYERS; %2++) if (IsPlayerConnected(%2))
  486.                         #define __SSCANF_FOREACH__
  487.                     #endif
  488.                     string[end] = '\0';
  489.                     num = false;
  490.                     new
  491.                         name[MAX_PLAYER_NAME];
  492.                     ie = end - stringPos;
  493.                     foreach (Player, playerid)
  494.                     {
  495.                         GetPlayerName(playerid, name, sizeof (name));
  496.                         if (!strcmp(name, string[stringPos], true, ie))
  497.                         {
  498.                             setarg(paramPos, 0, playerid);
  499.                             num = true;
  500.                             break;
  501.                         }
  502.                     }
  503.                     if (!num)
  504.                     {
  505.                         setarg(paramPos, 0, INVALID_PLAYER_ID);
  506.                     }
  507.                     string[end] = ch;
  508.                     #if defined __SSCANF_FOREACH__
  509.                         #undef foreach
  510.                         #undef __SSCANF_FOREACH__
  511.                     #endif
  512.                 }
  513.                 stringPos = end;
  514.             }
  515.             case 's', 'z':
  516.             {
  517.                 new
  518.                     i = 0,
  519.                     ch;
  520.                 if (format[formatPos])
  521.                 {
  522.                     while ((ch = string[stringPos++]) && ch != delim)
  523.                     {
  524.                         setarg(paramPos, i++, ch);
  525.                     }
  526.                     if (!i)
  527.                     {
  528.                         return -1;
  529.                     }
  530.                 }
  531.                 else
  532.                 {
  533.                     while ((ch = string[stringPos++]))
  534.                     {
  535.                         setarg(paramPos, i++, ch);
  536.                     }
  537.                 }
  538.                 stringPos--;
  539.                 setarg(paramPos, i, '\0');
  540.             }
  541.             default:
  542.             {
  543.                 continue;
  544.             }
  545.         }
  546.  
  547.         while (string[stringPos] && string[stringPos] != delim && string[stringPos] > ' ')
  548.         {
  549.             stringPos++;
  550.         }
  551.  
  552.         while (string[stringPos] && (string[stringPos] == delim || string[stringPos] <= ' '))
  553.         {
  554.             stringPos++;
  555.         }
  556.  
  557.         paramPos++;
  558.     }
  559.     do
  560.     {
  561.         if ((delim = format[formatPos++]) > ' ')
  562.         {
  563.             if (delim == '\'')
  564.             {
  565.                 while ((delim = format[formatPos++]) && delim != '\'') {}
  566.             }
  567.             else if (delim != 'z')
  568.             {
  569.                 return delim;
  570.             }
  571.         }
  572.     }
  573.     while (delim > ' ');
  574.  
  575.     return 0;
  576. }
  577.  
  578.  
  579. SendClientMessageEx(const iPlayer, const iColor, const szFormat[], { Float, _ }: ...)
  580. {
  581.     new iArgs = (numargs() - 3) << 2;
  582.     if(iArgs)
  583.     {
  584.         static s_szBuf[144], s_iAddr1, s_iAddr2;
  585.         #emit ADDR.PRI szFormat
  586.         #emit STOR.PRI s_iAddr1
  587.         for(s_iAddr2 = s_iAddr1 + iArgs, iArgs += 12; s_iAddr2 != s_iAddr1; s_iAddr2 -= 4)
  588.         {
  589.             #emit LOAD.PRI s_iAddr2
  590.             #emit LOAD.I
  591.             #emit PUSH.PRI
  592.         }
  593.         #emit CONST.PRI s_szBuf
  594.         #emit PUSH.S szFormat
  595.         #emit PUSH.C 144
  596.         #emit PUSH.PRI
  597.         #emit PUSH.S iArgs
  598.         #emit SYSREQ.C format
  599.         #emit LCTRL 4
  600.         #emit LOAD.S.ALT iArgs
  601.         #emit ADD.C 4
  602.         #emit ADD
  603.         #emit SCTRL 4
  604.         return (iPlayer != -1) ? SendClientMessage(iPlayer, iColor, s_szBuf) : SendClientMessageToAll(iColor, s_szBuf);
  605.     }
  606.     return (iPlayer != -1) ? SendClientMessage(iPlayer, iColor, szFormat) : SendClientMessageToAll(iColor, szFormat);
  607. }
Advertisement
Add Comment
Please, Sign In to add comment