hlmod.hu
https://hlmod.hu/

Admin Entry Log mentése
https://hlmod.hu/viewtopic.php?f=9&t=23831
Oldal: 1 / 1

Szerző:  attila2660 [ 2016.02.03. 12:00 ]
Hozzászólás témája:  Admin Entry Log mentése

Sziasztok olyan kérdésem lenne hogy ennél a pluginnál hol állítom be hogy hova mentse a log fájlt: Admin Entry Log

Itt az sma:
  1. /* Plugin generated by AMXX-Studio */
  2.  
  3. #include <amxmodx>
  4. #include <amxmisc>
  5. #include < csx >
  6. #include < csstats >
  7.  
  8. #define PLUGIN "Admin Entry Log"
  9. #define VERSION "1.5"
  10. #define AUTHOR "B34$T"
  11.  
  12. new file_to_write[64]
  13. new jtime[50],steamid[39]
  14.  
  15. public plugin_init()
  16. {
  17. register_plugin(PLUGIN, VERSION, AUTHOR)
  18.    
  19. new configsdir[64]
  20. get_configsdir(configsdir, 63)
  21. formatex(file_to_write, 63,"%s/adminlog.txt", configsdir)
  22.  
  23. }
  24. public client_putinserver( id )
  25. {
  26.     set_task( 5.0, "admin_record", id )
  27. }
  28.  
  29. public admin_record(id)
  30. {
  31. if(get_user_flags(id) & ADMIN_KICK)
  32. {
  33. get_time("%m/%d/%Y - %H:%M:%S", jtime[id], 49)
  34. get_user_authid(id, steamid[id], 38)   
  35. }
  36. }
  37. public client_disconnect(id)
  38. {
  39. if(get_user_flags(id) & ADMIN_KICK)
  40. {
  41. LoadData(id)
  42. }
  43. }
  44.  
  45. public LoadData(id)
  46. {
  47. new ltime[50]
  48. new name[35],output[364]
  49.  
  50. get_user_name(id,name,34);
  51. get_time("%m/%d/%Y - %H:%M:%S", ltime, 49)
  52. formatex(output, 363, "Admin neve: %s { %s } | Csatlakozott:[%s] | Lecsatlakozott : [%s]^n",name, steamid[id],jtime[id],ltime)
  53. new file = fopen(file_to_write, "at")
  54. fprintf(file, "%s", output)
  55. fclose(file)
  56. }

Szerző:  SmaCk [ 2016.02.03. 12:17 ]
Hozzászólás témája:  Re: Admin Entry Log mentése

Kód:
A plugin működése A plugin csak a kick joggal rendelkező Adminokat vesz figyelembe, a loginos Adminokat nem veszi figyelembe! A log fájlt a "configs" mappán belül találod!


  1. formatex(file_to_write, 63,"%s/adminlog.txt", configsdir)

Szerző:  attila2660 [ 2016.02.03. 12:34 ]
Hozzászólás témája:  Re: Admin Entry Log mentése

Köszi, mire írjam át azt a sort hogy a logs-ba mentse?

Szerző:  Akosch:. [ 2016.02.03. 16:23 ]
Hozzászólás témája:  Re: Admin Entry Log mentése

  1. get_configsdir(configsdir, 63)
  2. // -->
  3. get_localinfo( "amxx_logdir", configsdir, charsmax( configsdir ) );

Vagy simán log_to_file függvény.

Szerző:  attila2660 [ 2016.02.03. 16:41 ]
Hozzászólás témája:  Re: Admin Entry Log mentése

Nem jó, nem a logs-ba teszi hanem simán cstrike-ba. Én ide szeretném cstrike--->addons--->amxmodx--->logs

Oldal: 1 / 1 Minden időpont UTC+02:00 időzóna szerinti
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/