Ads keep us online. Without them, we wouldn't exist. We don't have paywalls or sell mods - we never will. But every month we have large bills and running ads is our only way to cover them. Please consider unblocking us. Thank you from GameBanana <3

[AMXX] Hitzone Practice

A Config Script for Counter-Strike 1.6

No ads for members. Membership is 100% free. Sign up!
104 3 kb Raw Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#include <amxmodx>
#include <fun>
#include <nvault>
#pragma semicolon 1;

#define plugin "hitzonepractice"
#define version "0.1"
#define author "blake_won"

new vault;
new g_steamid[33][35], g_bits[33];

public plugin_init()
{
        register_plugin(plugin, version, author);
        register_clcmd("say /hzp", "hzp_menu");

        vault = nvault_open("hitzonepractice");
        if(vault == INVALID_HANDLE)
                set_fail_state("Error opening nVault");

        nvault_prune(vault, 0, get_systime() - (86400 * 7));
}

public client_authorized(id)
{
        if(!is_user_bot(id) && !is_user_hltv(id))
        {
                get_user_authid(id, g_steamid[id], charsmax(g_steamid));
                get_bits(id);
        }
}

public client_putinserver(id) (0 < g_bits[id] < 255) ? set_user_hitzones(id, 0, g_bits[id]) : (g_bits[id] = 255);

public client_disconnect(id) save_bits(id);

public plugin_end() nvault_close(vault);

public get_bits(id)
{
        new key[40];

        formatex(key, 39, "%sbits", g_steamid[id]);
        g_bits[id] = nvault_get(vault , key);
}

public save_bits(id)
{
        new key[40], data[4];

        formatex(key, 39, "%sbits", g_steamid[id]);
        formatex(data, 3, "%i", g_bits[id]);
        nvault_set(vault, key , data);
}

public hzp_menu(id)
{
        new menu = menu_create("Hitzone Practice Menu", "mh_hzp");

        g_bits[id] & (1<<HIT_HEAD)              ? menu_additem(menu, "Head", "0")               : menu_additem(menu, "\dHead", "7");
        g_bits[id] & (1<<HIT_CHEST)             ? menu_additem(menu, "Chest", "1")              : menu_additem(menu, "\dChest", "8");
        g_bits[id] & (1<<HIT_STOMACH)   ? menu_additem(menu, "Stomach", "2")    : menu_additem(menu, "\dStomach", "9");
        g_bits[id] & (1<<HIT_LEFTARM)   ? menu_additem(menu, "LeftArm", "3")    : menu_additem(menu, "\dLeftArm", "10");
        g_bits[id] & (1<<HIT_RIGHTARM)  ? menu_additem(menu, "RightArm", "4")   : menu_additem(menu, "\dRightArm", "11");
        g_bits[id] & (1<<HIT_LEFTLEG)   ? menu_additem(menu, "LeftLeg", "5")    : menu_additem(menu, "\dLeftLeg", "12");
        g_bits[id] & (1<<HIT_RIGHTLEG)  ? menu_additem(menu, "RightLeg", "6")   : menu_additem(menu, "\dRightLeg", "13");

        menu_setprop(menu, MPROP_NUMBER_COLOR, "\w");
        menu_display(id, menu, 0);
        return PLUGIN_HANDLED;
}

public mh_hzp(id, menu, item)
{
        if(item == MENU_EXIT)
        {
                menu_destroy(menu);
                return PLUGIN_HANDLED;
        }

        new data[6], name[64];
        new access, callback;
        menu_item_getinfo(menu, item, access, data, charsmax(data), name, charsmax(name), callback);
        new key = str_to_num(data);

        switch(key)
        {
                case 0: g_bits[id] -= 2;        case 7: g_bits[id] += 2;
                case 1: g_bits[id] -= 4;        case 8: g_bits[id] += 4;
                case 2: g_bits[id] -= 8;        case 9: g_bits[id] += 8;
                case 3: g_bits[id] -= 16;       case 10: g_bits[id] += 16;
                case 4: g_bits[id] -= 32;       case 11: g_bits[id] += 32;
                case 5: g_bits[id] -= 64;       case 12: g_bits[id] += 64;
                case 6: g_bits[id] -= 128;      case 13: g_bits[id] += 128;
        }

        set_user_hitzones(id, 0, g_bits[id]);
        //client_print(id, print_chat, "Current Bits: %i.", g_bits[id]);

        menu_destroy(menu);
        hzp_menu(id);
        return PLUGIN_HANDLED;
}
Plugin: Hitzone Practice
Version: 0.1

Commands: /hzp - Opens the Hitzone Practice Menu
Description: HzP makes it possible for every player to adjust their own attack hitzones. You can practice headshots, legshots, or any other specific hitzone while everyone else is still able to play normally and do damage to any hitzone. *Knife attacks are not effected by this.
nVault: Hitzones are saved so you do not have to readjust your hitzones everytime you play. Entries older than a week are auto removed.
Sign up to access this!

No comments yet

Embed

Share banner
Image URL
HTML embed code
BB embed code
Markdown embed code

Credits

Original Authors
blake_won
Amxx codes/script

Submitter

Ghost1495111 avatar
Ghost1495111 Joined 4y ago
inactive
4,038 points Ranked 1747th
41 medals 4 legendary 12 rare
  • Submitted 15 Tools Medal icon
  • Submitted 50 Gamefiles Medal icon
  • 15+ Entries! GameBanana’s Christmas Giveaway 2016 Medal icon
  • Thanked 500 submitters Medal icon
  • 2nd Place - Game Poetry Contest Medal icon
  • Submitted 5 Tools Medal icon
Ghost1495111
Redistributor
Are you the owner? Request Ownership
Sign up to access this!
Sign up to access this!
Sign up to access this!

Game

Sign up to access this!

Category

License

Attributes

Language
Pawn

Share

  • Share on Reddit
  • Share on Twitter
  • Share on Facebook
  • 0
  • 1.8k
  • 3y

More from Submitter

More AMX/X Scripts Scripts