AMXX-BG.INFO zmvip.inc Raw include

zmvip.inc

Original include source with line numbers.

Back Download .inc
1 /******************************************************************
2
3 Zm VIP for Zombie Plague 4.3
4 Author: aaarnas
5
6 *******************************************************************
7
8 This (zm vip) plugin uses it's own extra
9 items simmilar like in main mod(Zombie Plague).
10 There are the main natives/forward witch required to
11 register extra items plugins on this zm vip plugin.
12
13 Also it's has own authentication system (If MODE 1 is on)
14 Use native zv_get_user_flags(id) to check player flags in
15 other plugins:
16
17 #include <zmvip>
18
19 public function()
20 {
21 if(zv_get_user_flags(id) > 0) // Checks if player has any vip privilegies.
22 if(zv_get_user_flags(id) & ZV_MAIN) // Checks if player has specific privilegie.
23 }
24
25 *******************************************************************/
26 #if defined _zmvip_included
27 #endinput
28 #endif
29
30 #define _zmvip_included
31
32 #define ZV_PLUGIN_HANDLED 97
33
34 /* Flags */
35 #define ZV_MAIN (1<<0)
36 #define ZV_MULTI (1<<1)
37 #define ZV_UNLIMITED (1<<2)
38 #define ZV_DAMAGE (1<<3)
39
40 /* Teams */
41 #define ZV_TEAM_ZOMBIE (1<<0)
42 #define ZV_TEAM_HUMAN (1<<1)
43 #define ZV_TEAM_NEMESIS (1<<2)
44 #define ZV_TEAM_SURVIVOR (1<<3)
45
46
47 /* Natives */
48
49 /* Registers extra items on this plugin for VIPs (Only if MODE 2 is active)
50 *
51 * @param name Extra item name.
52 * @param discription Extra item discription (simmilar like zombie class discription).
53 * @param cost How much ammo packs will cost this item for player.
54 * @param team Teams allowed to buy this item. (0 for all teams)
55 * @return Extra item id.
56 */
57 native zv_register_extra_item(const name[], const discription[], cost, team)
58
59 /* Gets user flags (Only if MODE 1 is active)
60 *
61 * @param id Player index.
62 * @return Player flags.
63 */
64 native zv_get_user_flags(id)
65
66
67 /* Forwards */
68
69 /* Called then player selects extra item in his VIP meniu. (Only if MODE 2 is active)
70 *
71 * You can stop player of buing item returning ZV_PLUGIN_HANDLED.
72 * Player will be refunded automaticaly
73 *
74 * @param id Player index.
75 * @param itemid Extra item id, witch player bought.
76 */
77 forward zv_extra_item_selected(id, itemid)