Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- native zp_get_user_zombie(index);
- new g_status_sync;
- new g_ammopacks
- public plugin_init()
- {
- register_plugin("PGL-Zombie Stats", "1.0", "Hattrick");
- register_event("StatusValue", "showStatus", "be", "1=2", "2!0");
- register_event("StatusValue", "hideStatus", "be", "1=1", "2=0");
- g_status_sync = CreateHudSyncObj();
- }
- public showStatus(id)
- {
- if (is_user_connected(id) && !zp_get_user_zombie(id))
- {
- new name[32], pid = read_data(2);
- get_user_name(pid, name, 31);
- if (zp_get_user_zombie(pid))
- {
- set_hudmessage(50, 50, 50, -1.0, 0.60, 1, 0.01, 3.0, 0.01, 0.01, -1)
- ShowSyncHudMsg(id, g_status_sync, "%s^n[ %s HP | Ammo Packs: %d ]", name, g_ammopacks(pid));
- }
- }
- }
- public hideStatus(id)
- {
- ClearSyncHud(id, g_status_sync);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement