Advertisement
Hyuna

Cash System with API v1.0

Jun 1st, 2017
500
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 16.03 KB | None | 0 0
  1. /*
  2.     Me trying build a cash(/points/money) system for CS 1.6
  3.    
  4.     Compatible with AMXX 1.8.2+ (But I recommand to use AMXX 1.8.3+)
  5.     Untested on lower versions
  6. */
  7. #include <amxmodx>
  8. #include <amxmisc>
  9. #include <fakemeta>
  10. #include <hamsandwich>
  11. #include <nvault>
  12.  
  13. #define semicolon 1
  14.  
  15.  
  16. // Settings
  17.  
  18. /* Max Cash */
  19. #define MAX_CASH 2147483647 // 2^31 - 1
  20.  
  21. /* Admin flag for commands, see ADMIN_* const */
  22. #define ADMIN_FLAG ADMIN_BAN
  23.  
  24. /* Min & Max for getcash command */
  25. #define MIN_GETCASH 50
  26. #define MAX_GETCASH 1337
  27.  
  28. /* Min & Max for nextcash command */
  29. #define MIN_NEXTCASH 50
  30. #define MAX_NEXTCASH 1337
  31.  
  32. /* Time to wait between nextcash command (seconds) */
  33. #define TIMEWAIT_NEXTCASH 360.0
  34.  
  35. // End of settings
  36.  
  37.  
  38. /* Toggle debug mod (for testing purpse only) */
  39. #define DEBUG
  40.  
  41. #if defined DEBUG
  42. new g_szLogfile[32];
  43. #endif
  44.  
  45. /* Backward Compatibility, DON'T TOUCH */
  46. #if AMXX_VERSION_NUM < 183
  47.     #define OLD_VERSION
  48.     #define MAX_PLAYERS 32
  49.     #define MAX_NAME_LENGTH 32
  50. #endif
  51.  
  52. #define PLUGIN_VERSION "v1.0"
  53.  
  54. new g_szNextCashEntName[] = "ent_nextcash";
  55. new g_szVault[] = "CashSys";
  56. new g_hVault;
  57.  
  58. new g_iCash[MAX_PLAYERS + 1];
  59. new bool:g_bCanGetCash[MAX_PLAYERS + 1];
  60. new bool:g_bCanNextCash[MAX_PLAYERS + 1];
  61. new g_iNextCashEntity[MAX_PLAYERS + 1];
  62.  
  63. public plugin_init() {
  64.     register_plugin("Cash System + API",PLUGIN_VERSION,"Hyuna");
  65.    
  66. #if defined OLD_VERSION
  67.     register_concmd("amx_addcash","cmdAddCash",ADMIN_FLAG,"<name or #userid> <cash> - Adds amount of cash to the player.",1);
  68.     register_concmd("amx_removecash","cmdRemoveCash",ADMIN_FLAG,"<name or #userid> <cash> - Removes amount of cash from the player.",1);
  69. #else
  70.     register_concmd("amx_addcash","cmdAddCash",ADMIN_FLAG,"<name or #userid> <cash> - Adds amount of cash to the player.",1,false);
  71.     register_concmd("amx_removecash","cmdRemoveCash",ADMIN_FLAG,"<name or #userid> <cash> - Removes amount of cash from the player.",1,false);
  72. #endif  
  73.    
  74.     register_clcmd("say","ActionSayHandler");
  75.     register_clcmd("say_team","ActionSayHandler");
  76.    
  77.     register_logevent("EventRoundStart",2,"1=Round_Start");
  78.    
  79.     RegisterHam(Ham_Think,"info_target","fw_NextCashEntityThinkPost",1);
  80.    
  81.     g_hVault = nvault_open(g_szVault);
  82.    
  83.     if (g_hVault == INVALID_HANDLE)
  84.     {
  85.         debug_message("CRITICAL ERROR: Falied to open nvault %s, PLUGIN ENDED RUNNING.",g_szVault);
  86.         set_fail_state("Error in creating nVault, See debug log if available.");
  87.     }
  88. }
  89.  
  90. #if defined DEBUG
  91. public plugin_cfg() {
  92.     get_time("%d-%m-%Y",g_szLogfile,charsmax(g_szLogfile));
  93.    
  94.     format(g_szLogfile,charsmax(g_szLogfile),"cashsysdebug_%s.txt",g_szLogfile);
  95.    
  96.     debug_message("----------------------------------");
  97.     debug_message("* Plugin name: Cash System + API");
  98.     debug_message("* Plugin version: %s",PLUGIN_VERSION);
  99.     debug_message("* Plugin author: Hyuna");
  100.     debug_message("* Debug mod: Active");
  101.     debug_message("** Have a nice debug! ;) **");
  102.     debug_message("----------------------------------");
  103. }
  104. #endif
  105.  
  106. public plugin_end() {
  107.     debug_message("Closing nVault %d",g_hVault);
  108.     nvault_close(g_hVault);
  109.     debug_message("Plugin end running");
  110. }
  111.  
  112. public plugin_natives() {
  113.     register_library("cashsystem");
  114.    
  115.     register_native("set_user_cash","native_set_user_cash",0);
  116.     register_native("get_user_cash","native_get_user_cash",0);
  117. }
  118.  
  119. public native_set_user_cash(pluginid,params) {
  120.     static client,iCash;
  121.    
  122.     client = get_param(1);
  123.    
  124.     if(!isClientValid(client,false))
  125.     {
  126.         log_error(AMX_ERR_NATIVE,"Player ID %d not found!",client);
  127.         debug_message("NATIVE CALL ERROR: set_user_cash - Player ID %d not found; PluginID: %d;",client,pluginid);
  128.         return 0;
  129.     }
  130.    
  131.     iCash = clamp(get_param(2),0,MAX_CASH);
  132.    
  133.     debug_message("NATIVE CALL: set_user_cash - Player ID %d; New cash: %d; PluginID: %d;",client,iCash,pluginid);
  134.    
  135.     g_iCash[client] = iCash;
  136.    
  137.     SaveData(client);
  138.    
  139.     return 1;
  140. }
  141.  
  142. public native_get_user_cash(pluginid,params) {
  143.     static client;
  144.    
  145.     client = get_param(1);
  146.    
  147.     if(!isClientValid(client,false))
  148.     {
  149.         log_error(AMX_ERR_NATIVE,"Player ID %d not found!",client);
  150.         debug_message("NATIVE CALL ERROR: get_user_cash - Player ID %d not found; PluginID: %d;",client,pluginid);
  151.         return -1;
  152.     }
  153.    
  154.     debug_message("NATIVE CALL: get_user_cash - Player ID %d; Cash: %d; PluginID: %d;",client,g_iCash[client],pluginid);
  155.    
  156.     return g_iCash[client];
  157. }
  158.  
  159. public fw_NextCashEntityThinkPost(ent) {
  160.     static iOwner,szClassname[32];
  161.    
  162.     if (!pev_valid(ent))
  163.         return;
  164.    
  165.     pev(ent,pev_classname,szClassname,charsmax(szClassname));
  166.    
  167.     if (!equal(szClassname,g_szNextCashEntName))
  168.         return;
  169.        
  170.     iOwner = pev(ent,pev_owner);
  171.    
  172.     g_bCanNextCash[iOwner] = true;
  173.    
  174.     debug_message("Time for player %d (EntID %d) have been passed, releasing him...",iOwner,ent);
  175. }
  176.  
  177. public cmdAddCash(client,level,cid) {
  178.     static szArg1[8],szArg2[12],
  179.     szAuthID[24],szAuthID2[24],
  180.     szName[MAX_NAME_LENGTH],szName2[MAX_NAME_LENGTH],
  181.     plr,iCash;
  182.    
  183.     if (!cmd_access(client,level,cid,3))
  184.         return PLUGIN_HANDLED;
  185.        
  186.     read_argv(1,szArg1,charsmax(szArg1));
  187.     plr = cmd_target(client,szArg1,(CMDTARGET_OBEY_IMMUNITY | CMDTARGET_ALLOW_SELF | CMDTARGET_NO_BOTS));
  188.    
  189.     if (!plr)
  190.         return PLUGIN_HANDLED;
  191.        
  192.     read_argv(2,szArg2,charsmax(szArg2));
  193.     iCash = str_to_num(szArg2);
  194.    
  195.     if (iCash < 1)
  196.     {
  197.         console_print(client,"[AMXX] You've can't use negative value!");
  198.         return PLUGIN_HANDLED;
  199.     }
  200.    
  201.     g_iCash[plr] = clamp((g_iCash[plr] + iCash),0,MAX_CASH);
  202.    
  203.     SaveData(plr);
  204.    
  205.     get_user_authid(client,szAuthID,charsmax(szAuthID));
  206.     get_user_name(client,szName,charsmax(szName));
  207.     get_user_authid(plr,szAuthID2,charsmax(szAuthID2));
  208.     get_user_name(plr,szName2,charsmax(szName2));
  209.    
  210.     log_amx("Cmd: ^"%s<%d><%s><>^" added %d cash to ^"%s<%d><%s><>^"", szName,get_user_userid(client),szAuthID,iCash,szName2,get_user_userid(plr),szAuthID2);
  211.     debug_message("ADMIN %s added %d cash to PLAYER %s.",szName,iCash,szName2);
  212.     show_activity(client,szName,"added %d cash to %s.",iCash,szName2);
  213.     console_print(client,"[AMXX] You've added %d cash to ^"%s^".",iCash,szName);
  214.        
  215.     return PLUGIN_HANDLED;
  216. }
  217.  
  218. public cmdRemoveCash(client,level,cid) {
  219.     static szArg1[8],szArg2[12],
  220.     szAuthID[24],szAuthID2[24],
  221.     szName[MAX_NAME_LENGTH],szName2[MAX_NAME_LENGTH],
  222.     plr,iCash;
  223.    
  224.     if (!cmd_access(client,level,cid,3))
  225.         return PLUGIN_HANDLED;
  226.        
  227.     read_argv(1,szArg1,charsmax(szArg1));
  228.     plr = cmd_target(client,szArg1,(CMDTARGET_OBEY_IMMUNITY | CMDTARGET_ALLOW_SELF | CMDTARGET_NO_BOTS));
  229.    
  230.     if (!plr)
  231.         return PLUGIN_HANDLED;
  232.        
  233.     read_argv(2,szArg2,charsmax(szArg2));
  234.     iCash = str_to_num(szArg2);
  235.    
  236.     if (iCash < 1)
  237.     {
  238.         console_print(client,"[AMXX] You've can't use negative value!");
  239.         return PLUGIN_HANDLED;
  240.     }
  241.    
  242.     g_iCash[plr] = clamp((g_iCash[plr] - iCash),0,MAX_CASH);
  243.    
  244.     SaveData(plr);
  245.    
  246.     get_user_authid(client,szAuthID,charsmax(szAuthID));
  247.     get_user_name(client,szName,charsmax(szName));
  248.     get_user_authid(plr,szAuthID2,charsmax(szAuthID2));
  249.     get_user_name(plr,szName2,charsmax(szName2));
  250.    
  251.     log_amx("Cmd: ^"%s<%d><%s><>^" removed %d cash from ^"%s<%d><%s><>^"", szName,get_user_userid(client),szAuthID,iCash,szName2, get_user_userid(plr),szAuthID2);
  252.     show_activity(client,szName,"removed %d cash from %s.",iCash,szName2);
  253.     debug_message("ADMIN %s removed %d cash from PLAYER %s.",szName,iCash,szName2);
  254.     console_print(client,"[AMXX] You've removed %d cash from ^"%s^".",iCash,szName);
  255.        
  256.     return PLUGIN_HANDLED;
  257. }
  258.  
  259. public ActionSayHandler(client) {
  260.     new szMsg[32];
  261.     new szArg1[12],szArg2[12],szArg3[12];
  262.  
  263.     read_argv(1,szMsg,charsmax(szMsg));
  264.  
  265.     parse(szMsg,szArg1,charsmax(szArg1),szArg2,charsmax(szArg2),szArg3,charsmax(szArg3));
  266.    
  267.     if (equal(szArg1,"/cash"))
  268.         return ActionShowCash(client,szArg2);
  269.  
  270.     else if (equal(szArg1,"/transfer") || equal(szArg1,"/send") || equal(szArg1,"/give"))
  271.         return ActionTransfer(client,szArg2,szArg3);
  272.        
  273.     else if (equal(szArg1,"/gamble"))
  274.         return ActionGamble(client,szArg2);
  275.        
  276.     else if (equal(szArg1,"/getcash"))
  277.         return ActionGetCash(client);
  278.        
  279.     else if (equal(szArg1,"/nextcash"))
  280.         return ActionNextCash(client);
  281.  
  282.     return PLUGIN_CONTINUE;
  283. }
  284.  
  285. public ActionShowCash(client,plrname[]) {
  286.     static szName[MAX_NAME_LENGTH],plr;
  287.    
  288.     if (!plrname[0])
  289.         client_print(client,print_chat,"[AMXX] Your cash: %d",g_iCash[client]);
  290.        
  291.     else
  292.     {
  293.         plr = cmd_target(client,plrname,(CMDTARGET_NO_BOTS | CMDTARGET_ALLOW_SELF));
  294.        
  295.         if (plr == client)
  296.             client_print(client,print_chat,"[AMXX] Your cash: %d",g_iCash[client]);
  297.            
  298.         else if(!is_user_connected(plr))
  299.             client_print(client,print_chat,"[AMXX] Player %s not found.",plrname);
  300.        
  301.         else
  302.         {
  303.             get_user_name(plr,szName,charsmax(szName));
  304.             client_print(client,print_chat,"[AMXX] %s cash: %d",szName,g_iCash[plr]);
  305.         }
  306.     }
  307.    
  308.     return PLUGIN_HANDLED;
  309. }
  310.  
  311. public ActionTransfer(client,plrname[],cashamount[12]) {
  312.     static szName[MAX_NAME_LENGTH],szName2[MAX_NAME_LENGTH],plr,iCash;
  313.  
  314.     if (!plrname[0])
  315.         client_print(client,print_chat,"[AMXX] Syntex: /send <name> <amount>");
  316.  
  317.     else
  318.     {
  319.         plr = cmd_target(client,plrname,(CMDTARGET_NO_BOTS));
  320.  
  321.         if (!is_user_connected(plr))
  322.         {
  323.             client_print(client,print_chat,"[AMXX] Player %s not found.",plrname);
  324.             return PLUGIN_HANDLED;
  325.         }
  326.        
  327.         else if (plr == client)
  328.         {
  329.             client_print(client,print_chat,"[AMXX] You can't send to yourself cash!");
  330.             return PLUGIN_HANDLED;
  331.         }
  332.  
  333.         else if (!is_str_num(cashamount))
  334.         {
  335.             client_print(client,print_chat,"[AMXX] You must enter numbers only!");
  336.             return PLUGIN_HANDLED;
  337.         }
  338.  
  339.         iCash = str_to_num(cashamount);
  340.  
  341.         if (iCash < 1)
  342.             client_print(client,print_chat,"[AMXX] You must send at least 1 cash!");
  343.  
  344.         else if (g_iCash[client] < iCash)
  345.             client_print(client,print_chat,"[AMXX] You don't have that amount of cash!");
  346.  
  347.         else
  348.         {
  349.             g_iCash[client]-=iCash;
  350.             g_iCash[plr]+=iCash;
  351.    
  352.             get_user_name(client,szName,charsmax(szName));
  353.             get_user_name(plr,szName2,charsmax(szName2));
  354.            
  355.             client_print(client,print_chat,"[AMXX] You got %d cash from %s.",iCash,szName);
  356.             client_print(client,print_chat,"[AMXX] You have send %d cash to %s.",iCash,szName);
  357.            
  358.             debug_message("SEND: PLAYER %s send %d cash to PLAYER %s.",szName,iCash,szName2);
  359.         }
  360.     }
  361.  
  362.     return PLUGIN_HANDLED;
  363. }
  364.  
  365. public ActionGamble(client,cashamount[12]) {
  366.     static szName[MAX_NAME_LENGTH],iCash;
  367.    
  368.     if (!cashamount[0])
  369.         client_print(client,print_chat,"Syntex: /gamble <amount>");
  370.        
  371.     else
  372.     {
  373.         if (!is_str_num(cashamount))
  374.         {
  375.             if (equal(cashamount,"all"))
  376.                 num_to_str(g_iCash[client],cashamount,charsmax(cashamount));
  377.                
  378.             else
  379.             {
  380.                 client_print(client,print_chat,"[AMXX] You must enter numbers only!");
  381.                 return PLUGIN_HANDLED;
  382.             }
  383.         }
  384.        
  385.         iCash = str_to_num(cashamount);
  386.        
  387.         if (iCash < 1)
  388.             client_print(client,print_chat,"[AMXX] You must gamble at least 1 cash!");
  389.  
  390.         else if (g_iCash[client] < iCash)
  391.             client_print(client,print_chat,"[AMXX] You don't have that amount of cash!");
  392.            
  393.         else
  394.         {
  395.             get_user_name(client,szName,charsmax(szName));
  396.            
  397.             switch(random(2))
  398.             {
  399.                 case 0:
  400.                 {
  401.                     g_iCash[client] = clamp((g_iCash[client] + iCash),0,MAX_CASH);
  402.                     client_print(0,print_chat,"[AMXX] %s gambled on %d cash and won!",szName,iCash);
  403.                     debug_message("GAMBLE: PLAYER %s gambled on %d cash and won.",szName,iCash);
  404.                 }
  405.                
  406.                 case 1:
  407.                 {
  408.                     g_iCash[client] = clamp((g_iCash[client] - iCash),0,MAX_CASH);
  409.                     client_print(0,print_chat,"[AMXX] %s gambled on %d cash and lost!",szName,iCash);
  410.                     debug_message("GAMBLE: PLAYER %s gambled on %d cash and lost.",szName,iCash);
  411.                 }
  412.             }
  413.         }      
  414.     }
  415.    
  416.     return PLUGIN_HANDLED;
  417. }
  418.  
  419. public ActionGetCash(client) {
  420.     static iCash;
  421.    
  422.     if (!g_bCanGetCash[client])
  423.         client_print(client,print_chat,"[AMXX] You can use this command only next round!");
  424.        
  425.     else
  426.     {
  427.         g_bCanGetCash[client] = false;
  428.        
  429.         iCash = random_num(MIN_GETCASH,MAX_GETCASH);
  430.        
  431.         g_iCash[client] = clamp((g_iCash[client] + iCash),0,MAX_CASH);
  432.        
  433.         debug_message("GETCASH: Player ID %d got %d cash.",client,iCash);
  434.         client_print(client,print_chat,"[AMXX] You got %d cash, enjoy!",iCash);
  435.     }
  436.    
  437.     return PLUGIN_HANDLED;
  438. }
  439.  
  440. public ActionNextCash(client) {
  441.     static iCash;
  442.    
  443.     if (!g_bCanNextCash[client])
  444.         client_print(client,print_chat,"[AMXX] You need to wait more %.1f seconds to use this command!",(pev(g_iNextCashEntity[client],pev_nextthink) - get_gametime()));
  445.        
  446.     else
  447.     {
  448.         g_bCanNextCash[client] = false;
  449.        
  450.         iCash = random_num(MIN_NEXTCASH,MAX_NEXTCASH);
  451.        
  452.         g_iCash[client] = clamp((g_iCash[client] + iCash),0,MAX_CASH);
  453.        
  454.         set_pev(g_iNextCashEntity[client],pev_nextthink,(get_gametime() + TIMEWAIT_NEXTCASH));
  455.        
  456.         debug_message("NEXTCASH: Player ID %d got %d cash.",client,iCash);
  457.        
  458.         client_print(client,print_chat,"[AMXX] You got %d cash, enjoy!",iCash);
  459.     }
  460.    
  461.     return PLUGIN_HANDLED;
  462. }
  463.  
  464. public EventRoundStart() {
  465.     static i;
  466.    
  467.     for (i = 0; i < (MAX_PLAYERS + 1); i++)
  468.         g_bCanGetCash[i] = true;
  469.        
  470.     debug_message("New round started, g_bCanGetCash global reset.");
  471. }
  472.  
  473. public client_putinserver(client) {
  474.     LoadData(client);
  475.    
  476.     CreateEntity(client);
  477. }
  478.  
  479. #if defined OLD_VERSION
  480. public client_disconnect(client) {
  481.     SaveData(client);
  482.     RemoveEntity(client);
  483. }
  484. #else
  485. public client_disconnected(client,bool:drop,message[],maxlen) {
  486.     SaveData(client);
  487.     RemoveEntity(client);
  488. }
  489. #endif
  490.  
  491. stock LoadData(client) {
  492.     static some[32],szAuthID[24],t_szCash[12],t_bCanGetCash[2],t_bCanNextCash[2];
  493.    
  494.     if (!isClientValid(client,false))
  495.         return;
  496.        
  497.     get_user_authid(client,szAuthID,charsmax(szAuthID));
  498.        
  499.     if (nvault_get(g_hVault,szAuthID,some,charsmax(some)))
  500.     {
  501.         debug_message("LOAD DATA: AuthID: ^"%s^"; Data: ^"%s^"",szAuthID,some);
  502.        
  503.         replace_all(some,charsmax(some),"#"," ");
  504.         parse(some,t_szCash,charsmax(t_szCash),t_bCanGetCash,charsmax(t_bCanGetCash),t_bCanNextCash,charsmax(t_bCanNextCash));
  505.        
  506.         g_iCash[client] = str_to_num(t_szCash);
  507.         g_bCanGetCash[client] = bool:str_to_num(t_bCanGetCash);
  508.         g_bCanNextCash[client] = bool:str_to_num(t_bCanNextCash);
  509.     }
  510.        
  511.     else
  512.     {
  513.         debug_message("LOAD DATA: AuthID: ^"%s^"; Data: Entry not found!",szAuthID,some);
  514.         g_iCash[client] = 0;
  515.         g_bCanGetCash[client] = true;
  516.         g_bCanNextCash[client] = true;
  517.     }
  518. }
  519.  
  520.  
  521. stock SaveData(client) {
  522.     static some[32],szAuthID[24];
  523.    
  524.     if (!isClientValid(client,false))
  525.         return;
  526.    
  527.     get_user_authid(client,szAuthID,charsmax(szAuthID));
  528.    
  529.     formatex(some,charsmax(some),"%d#%d#%d",g_iCash[client],g_bCanGetCash[client],g_bCanNextCash[client]);
  530.     debug_message("SAVE DATA: AuthID: ^"%s^"; Data: ^"%s^"",szAuthID,some);
  531.    
  532.     nvault_set(g_hVault,szAuthID,some);
  533. }
  534.  
  535. stock CreateEntity(client) {
  536.     g_iNextCashEntity[client] = engfunc(EngFunc_CreateNamedEntity,engfunc(EngFunc_AllocString,"info_target"));
  537.    
  538.     if (!pev_valid(g_iNextCashEntity[client]))
  539.     {
  540.         debug_message("CRITICAL ERROR: Falied to create NextCash entity for player %d; PLUGIN ENDED RUNNING.",client);
  541.         set_fail_state("Error creating entities; See debug log if available.");
  542.     }
  543.        
  544.     set_pev(g_iNextCashEntity[client],pev_classname,g_szNextCashEntName);
  545.    
  546.     // So we know which client used nextcash
  547.     set_pev(g_iNextCashEntity[client],pev_owner,client);
  548.        
  549.     // Dummy think
  550.     set_think(g_iNextCashEntity[client],1.0);
  551.    
  552.     debug_message("Entity %d for player %d successfully created.",g_iNextCashEntity[client],client);
  553. }
  554.  
  555. stock RemoveEntity(client) {
  556.     if (!pev_valid(g_iNextCashEntity[client]))
  557.         return 0;
  558.    
  559.     engfunc(EngFunc_RemoveEntity,g_iNextCashEntity[client]);
  560.     debug_message("Entity %d for player %d removed.",g_iNextCashEntity[client],client);
  561.     g_iNextCashEntity[client] = -1;
  562.    
  563.     return 1;
  564. }
  565.  
  566. stock set_think(entity, Float:nextthink){
  567.     if (pev_valid(entity))
  568.     {
  569.         set_pev(entity,pev_nextthink,get_gametime() + nextthink);
  570.         return 1;
  571.     }
  572.    
  573.     return 0;
  574. }
  575.  
  576. stock bool:isClientValid(client, bool:bAlive) {
  577.     if (!is_user_connected(client))
  578.         return false;
  579.    
  580.     if (is_user_hltv(client) || is_user_bot(client))
  581.         return false;
  582.    
  583.     if (bAlive)
  584.         return bool:is_user_alive(client);
  585.    
  586.     return true;
  587. }
  588.  
  589.  
  590. stock debug_message(const msg[], any: ...){
  591. #if defined DEBUG
  592.     static szMsg[512];
  593.    
  594.     vformat(szMsg,charsmax(szMsg),msg,2);
  595.     log_to_file(g_szLogfile,szMsg);
  596.    
  597.     return 1;
  598. #else
  599.     return 0;
  600. #endif
  601. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement