HLMOD.HU Forrás Megtekintés - www.hlmod.hu
  1. #include <amxmodx>
  2.  
  3. #define PLUGIN "info"
  4. #define VERSION "0.1"
  5. #define AUTHOR "Kölök"
  6.  
  7. new hudsync;
  8. new maxplayers;
  9.  
  10. public plugin_init()
  11. {
  12. register_plugin(PLUGIN, VERSION, AUTHOR);
  13.  
  14. register_event( "ResetHUD", "eResetHUD", "be" );
  15.  
  16. hudsync = CreateHudSyncObj();
  17. maxplayers = get_maxplayers();
  18.  
  19. set_task(0.1, "stats", 0, "", 0, "b", 0);
  20. }
  21. public eResetHUD( id )
  22. {
  23. if( !is_user_bot( id ) )
  24. {
  25. message_begin( MSG_ALL, get_user_msgid( "HideWeapon" ), _, id );
  26. write_byte( ( 1 << 3 | 1 << 5 ) );
  27. message_end();
  28.  
  29. message_begin( MSG_ALL, get_user_msgid( "Crosshair" ), _, id );
  30. write_byte( 0 );
  31. message_end();
  32. }
  33. }
  34. public stats()
  35. {
  36. for(new i = 1 ; i <= maxplayers ; i++)
  37. {
  38. if(!is_user_alive(i))
  39. continue;
  40.  
  41. new HP = get_user_health(i);
  42.  
  43. new AP = get_user_armor(i);
  44.  
  45. new FRAGS = get_user_frags(i);
  46.  
  47. set_hudmessage(0, 255, 255, -1.0, 0.91, 0, 6.0, 12.0);
  48. ShowSyncHudMsg(i, hudsync , "%d Elet | %d pajzs | %d Oles", HP, AP, FRAGS);
  49. }
  50. }
  51.