AMXX-BG.INFO zp50_class_zombie.inc Raw include

zp50_class_zombie.inc

Original include source with line numbers.

Back Download .inc
1 #if defined _zp50_class_zombie_included
2 #endinput
3 #endif
4 #define _zp50_class_zombie_included
5
6 #include <zp50_core>
7 #include <zp50_class_zombie_const>
8
9 #if AMXX_VERSION_NUM >= 175
10 #pragma reqlib zp50_class_zombie
11 #if !defined AMXMODX_NOAUTOLOAD
12 #pragma loadlib zp50_class_zombie
13 #endif
14 #else
15 #pragma library zp50_class_zombie
16 #endif
17
18 /**
19 * Returns a player's current zombie class ID.
20 *
21 * @param id Player index.
22 * @return Internal zombie class ID, or ZP_INVALID_ZOMBIE_CLASS if not yet chosen.
23 */
24 native zp_class_zombie_get_current(id)
25
26 /**
27 * Returns a player's next zombie class ID (for the next infection).
28 *
29 * @param id Player index.
30 * @return Internal zombie class ID, or ZP_INVALID_ZOMBIE_CLASS if not yet chosen.
31 */
32 native zp_class_zombie_get_next(id)
33
34 /**
35 * Sets a player's next zombie class ID (for the next infection).
36 *
37 * @param id Player index.
38 * @param classid A valid zombie class ID.
39 * @return True on success, false otherwise.
40 */
41 native zp_class_zombie_set_next(id, classid)
42
43 /**
44 * Returns the default maximum health for a specific zombie class.
45 *
46 * Note: does not take into account any kind of HP multipliers.
47 *
48 * @param id Player index.
49 * @param classid A valid zombie class ID.
50 * @return Maximum amount of health points, -1 on error.
51 */
52 native zp_class_zombie_get_max_health(id, classid)
53
54 /**
55 * Registers a custom class which will be added to the zombie classes menu of ZP.
56 *
57 * Note: The returned zombie class ID can be later used to identify
58 * the class when calling the zp_get_user_zombie_class() natives.
59 *
60 * @param name Caption to display on the menu.
61 * @param description Brief description of the class.
62 * @param health Class health.
63 * @param speed Class maxspeed (can be a multiplier).
64 * @param gravity Class gravity multiplier.
65 * @return An internal zombie class ID, or ZP_INVALID_ZOMBIE_CLASS on failure.
66 */
67 native zp_class_zombie_register(const name[], const description[], health, Float:speed, Float:gravity)
68
69 /**
70 * Registers a custom player model for a given zombie class.
71 *
72 * @param classid A valid zombie class ID.
73 * @param model Player model's short name.
74 * @return True on success, false otherwise.
75 */
76 native zp_class_zombie_register_model(classid, const model[])
77
78 /**
79 * Registers a custom claw model for a given zombie class.
80 *
81 * @param classid A valid zombie class ID.
82 * @param clawmodel Claw model filename.
83 * @return True on success, false otherwise.
84 */
85 native zp_class_zombie_register_claw(classid, const clawmodel[])
86
87 /**
88 * Registers a zombie class' knockback multiplier.
89 *
90 * @param classid A valid zombie class ID.
91 * @param knockback Knockback multiplier.
92 * @return True on success, false otherwise.
93 */
94 native zp_class_zombie_register_kb(classid, Float:knockback)
95
96 /**
97 * Returns a zombie class' ID.
98 *
99 * @param name Class name to look for.
100 * @return Internal zombie class ID, or ZP_INVALID_ZOMBIE_CLASS if not found.
101 */
102 native zp_class_zombie_get_id(const real_name[])
103
104 /**
105 * Returns a zombie class' name.
106 *
107 * @param classid A valid zombie class ID.
108 * @param name The buffer to store the string in.
109 * @param len Character size of the output buffer.
110 * @return True on success, false otherwise.
111 */
112 native zp_class_zombie_get_name(classid, name[], len)
113
114 /**
115 * Returns a zombie class' real name (used when registering the class).
116 *
117 * @param classid A valid zombie class ID.
118 * @param name The buffer to store the string in.
119 * @param len Character size of the output buffer.
120 * @return True on success, false otherwise.
121 */
122 native zp_class_zombie_get_real_name(classid, real_name[], len)
123
124 /**
125 * Returns a zombie class' description.
126 *
127 * @param classid A valid zombie class ID.
128 * @param description The buffer to store the string in.
129 * @param len Character size of the output buffer.
130 * @return True on success, false otherwise.
131 */
132 native zp_class_zombie_get_desc(classid, description[], len)
133
134 /**
135 * Returns a zombie class' knockback multiplier.
136 *
137 * @param classid A valid zombie class ID.
138 * @return Knockback multiplier (float value).
139 */
140 native Float:zp_class_zombie_get_kb(classid)
141
142 /**
143 * Returns number of registered zombie classes.
144 *
145 * @return Zombie class count.
146 */
147 native zp_class_zombie_get_count()
148
149 /**
150 * Shows menu with available zombie classes to a player.
151 *
152 * @param id Player index.
153 */
154 native zp_class_zombie_show_menu(id)
155
156 /**
157 * Appends text to a class being displayed on the zombie classes menu.
158 * Use this on the class select pre forward.
159 *
160 * @param text Additional text to display.
161 */
162 native zp_class_zombie_menu_text_add(const text[])
163
164 /**
165 * Called when determining whether a class should be available to a player.
166 *
167 * Possible return values are:
168 * - ZP_CLASS_AVAILABLE (show in menu, allow selection)
169 * - ZP_CLASS_NOT_AVAILABLE (show in menu, don't allow selection)
170 * - ZP_CLASS_DONT_SHOW (don't show in menu, don't allow selection)
171 *
172 * @param id Player index.
173 * @param classid Internal zombie class ID.
174 */
175 forward zp_fw_class_zombie_select_pre(id, classid)
176