AMXX-BG.INFO zp50_core.inc Raw include

zp50_core.inc

Original include source with line numbers.

Back Download .inc
1 #if defined _zp50_core_included
2 #endinput
3 #endif
4 #define _zp50_core_included
5
6 #include <zp50_core_const>
7
8 #if AMXX_VERSION_NUM >= 175
9 #pragma reqlib zp50_core
10 #if !defined AMXMODX_NOAUTOLOAD
11 #pragma loadlib zp50_core
12 #endif
13 #else
14 #pragma library zp50_core
15 #endif
16
17 /**
18 * Returns whether a player is a zombie.
19 *
20 * @param id Player index.
21 * @return True if it is, false otherwise.
22 */
23 native zp_core_is_zombie(id)
24
25 /**
26 * Returns whether a player is the first zombie.
27 *
28 * @param id Player index.
29 * @return True if it is, false otherwise.
30 */
31 native zp_core_is_first_zombie(id)
32
33 /**
34 * Returns whether a player is the last zombie.
35 *
36 * @param id Player index.
37 * @return True if it is, false otherwise.
38 */
39 native zp_core_is_last_zombie(id)
40
41 /**
42 * Returns whether a player is the last human.
43 *
44 * @param id Player index.
45 * @return True if it is, false otherwise.
46 */
47 native zp_core_is_last_human(id)
48
49 /**
50 * Returns number of alive zombies.
51 *
52 * @return Zombie count.
53 */
54 native zp_core_get_zombie_count()
55
56 /**
57 * Returns number of alive humans.
58 *
59 * @return Human count.
60 */
61 native zp_core_get_human_count()
62
63 /**
64 * Turns a player into a zombie.
65 *
66 * @param id Player index to be infected.
67 * @param attacker Player who triggered the infection. (optional)
68 * @return True on success, false otherwise.
69 */
70 native zp_core_infect(id, attacker = 0)
71
72 /**
73 * Turns a player into a human.
74 *
75 * @param id Player index to be cured.
76 * @param attacker Player who triggered the cure. (optional)
77 * @return True on success, false otherwise.
78 */
79 native zp_core_cure(id, attacker = 0)
80
81 /**
82 * Forces a player to become a zombie/human.
83 *
84 * Note: use this only when previous checks need to be skipped.
85 *
86 * @param id Player index to be infected/cured.
87 * @return True on success, false otherwise.
88 */
89 native zp_core_force_infect(id)
90 native zp_core_force_cure(id)
91
92 /**
93 * Sets whether the player will be respawned as zombie or human.
94 *
95 * @param id Player index.
96 * @param zombie True to respawn as zombie, false otherwise.
97 */
98 native zp_core_respawn_as_zombie(id, zombie = true)
99
100 /**
101 * Called when a player gets infected.
102 *
103 * @param id Player index who was infected.
104 * @param attacker Player who triggered the infection.
105 * (0 if not available, id = attacker if he infected himself)
106 */
107 forward zp_fw_core_infect(id, attacker)
108 forward zp_fw_core_infect_post(id, attacker)
109
110 /**
111 * Called when a player turns back to human.
112 *
113 * @param id Player index who was cured.
114 * @param attacker Player who triggered the cure.
115 * (0 if not available, id = attacker if he cured himself)
116 */
117 forward zp_fw_core_cure(id, attacker)
118 forward zp_fw_core_cure_post(id, attacker)
119
120 /**
121 * Called on a player infect/cure attempt. You can block it by
122 * returning PLUGIN_HANDLED in your plugin.
123 *
124 * @param id Player index who is being infected/cured.
125 * @param attacker Player who is triggering the infection/cure.
126 * (0 if not available, id = attacker if he is infecting/curing himself)
127 */
128 forward zp_fw_core_infect_pre(id, attacker)
129 forward zp_fw_core_cure_pre(id, attacker)
130
131 /**
132 * Called when a player becomes the last zombie/human.
133 *
134 * Note: This is called for the first zombie too.
135 *
136 * @param id Player index.
137 */
138 forward zp_fw_core_last_zombie(id)
139 forward zp_fw_core_last_human(id)
140
141 /**
142 * Called when a player spawns, before applying human/zombie attributes to him.
143 *
144 * @param id Player index.
145 */
146 forward zp_fw_core_spawn_post(id)
147