daily pastebin goal
58%
SHARE
TWEET

Untitled

a guest Aug 12th, 2017 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <amxmodx>
  2.  
  3. native zp_get_user_zombie(index);
  4. new g_status_sync;
  5. new g_ammopacks
  6.  
  7. public plugin_init()
  8. {
  9.     register_plugin("PGL-Zombie Stats", "1.0", "Hattrick");
  10.     register_event("StatusValue", "showStatus", "be", "1=2", "2!0");
  11.     register_event("StatusValue", "hideStatus", "be", "1=1", "2=0");
  12.     g_status_sync = CreateHudSyncObj();
  13. }
  14.  
  15. public showStatus(id)
  16. {
  17.     if (is_user_connected(id) && !zp_get_user_zombie(id))
  18.     {
  19.         new name[32], pid = read_data(2);
  20.         get_user_name(pid, name, 31);
  21.         if (zp_get_user_zombie(pid))
  22.         {
  23.             set_hudmessage(50, 50, 50, -1.0, 0.60, 1, 0.01, 3.0, 0.01, 0.01, -1)
  24.             ShowSyncHudMsg(id, g_status_sync, "%s^n[ %s HP | Ammo Packs: %d ]", name, g_ammopacks(pid));
  25.         }
  26.     }
  27. }
  28.  
  29. public hideStatus(id)
  30. {
  31.     ClearSyncHud(id, g_status_sync);
  32. }
RAW Paste Data
Top