AMXX-BG.INFO ttt.inc Raw include

ttt.inc

Original include source with line numbers.

Back Download .inc
1 #if defined _ttt_included
2 #endinput
3 #endif
4 #define _ttt_included
5
6 #include <ttt_const>
7
8 #if AMXX_VERSION_NUM >= 175
9 #pragma reqlib ttt
10 #if !defined AMXMODX_NOAUTOLOAD
11 #pragma loadlib ttt
12 #endif
13 #else
14 #pragma library ttt
15 #endif
16
17 /**
18 * Sets players state.
19 *
20 * @param id Player index.
21 * @param PLAYER_STATE New state, enum PLAYER_STATE.
22 */
23 native ttt_set_specialstate(id, PLAYER_STATE);
24
25 /**
26 * Returns special count.
27 *
28 * @param PLAYER_STATE PLAYER_STATE enum.
29 * @return Number of specials.
30 */
31 native ttt_get_specialcount(PLAYER_STATE);
32
33 /**
34 * Returns roundtime.
35 *
36 * @return Roundtime.
37 */
38 native Float:ttt_get_roundtime();
39
40 /**
41 * Sets/returns players data.
42 *
43 * @param id Player index.
44 * @param PLAYER_DATA Enum PLAYER_DATA.
45 * @param newvalue New value to set.
46 * @return Data.
47 */
48 native ttt_get_playerdata(id, PLAYER_DATA);
49 native ttt_set_playerdata(id, PLAYER_DATA, newvalue);
50
51 /**
52 * Sets/returns game state.
53 *
54 * @param GLOBAL_INFO Enum GLOBAL_INFO.
55 * @param newvalue New value to set.
56 * @return value.
57 */
58 native ttt_get_globalinfo(GLOBAL_INFO);
59 native ttt_set_globalinfo(GLOBAL_INFO, newvalue);
60
61 /**
62 * Sets/returns game winner. Also, ends round if still active.
63 *
64 * @param team INNOCENT or TRAITOR.
65 * @return Game winner.
66 */
67 native ttt_get_winner();
68 native ttt_set_winner(team);
69
70 /**
71 * Adds item to Buymenu and returns id.
72 *
73 * @param name[] Items name.
74 * @param price Items price.
75 * @param team Items team, INNOCENT = INNO + DET, SPECIAL = TRA + DET.
76 * @return Item id.
77 */
78 native ttt_buymenu_add(const name[], const price, const team);
79
80 /**
81 * Opens buy menu for player.
82 *
83 * @param owner Players id.
84 */
85 native ttt_buymenu_show(owner);
86
87 /**
88 * Adds item to Backpack and returns id.
89 *
90 * @param owner Players id.
91 * @param name[] Items name.
92 * @return Item id.
93 */
94 native ttt_backpack_add(owner, name[]);
95
96 /**
97 * Remove item from Backpack.
98 *
99 * @param owner Players id.
100 * @param itemid[] Item id.
101 * @return something.
102 */
103 native ttt_backpack_remove(owner, itemid);
104
105 /**
106 * Opens backpack for player.
107 *
108 * @param owner Players id.
109 */
110 native ttt_backpack_show(owner);
111
112 /**
113 * Gets/sets/clears players dead body data.
114 *
115 * @param id Players id.
116 * @param BODY_DATA Enum BODY_DATA.
117 * @param newvalue New value to set.
118 * @return data.
119 */
120 native ttt_get_bodydata(id, BODY_DATA);
121 native ttt_set_bodydata(id, BODY_DATA, newvalue);
122 native ttt_clear_bodydata(id);
123
124 /**
125 * Setups item from backpack that will have DNA sample left on it, for example, Death Station and returns setupid.
126 *
127 * @param id Items or players (dont know) id.
128 * @param ent Entity id.
129 * @param time Time before DNA decays.
130 * @param owner DNA Sample owner.
131 * @param tracer Detective who can see DNA.
132 * @param active Is DNA seeable.
133 * @param name[] Items name.
134 * @return setupid.
135 */
136 native ttt_item_setup_add(id, ent, time, owner, tracer, active, name[]);
137
138 /**
139 * Removes setuped item - DNA stop existing, I think.
140 *
141 * @param setupid Setups id.
142 */
143 native ttt_item_setup_remove(setupid);
144
145 /**
146 * Updates/gets info about setup.
147 *
148 * @param setupid Setups id.
149 * @param array[] For example, static data[SetupData].
150 */
151 native ttt_item_setup_update(setupid, array[]);
152 native ttt_item_setup_get(setupid, array[]);
153
154 /**
155 * Gets item name from item_id.
156 *
157 * @param item_id Item id.
158 * @param name[] Items name.
159 * @param charsmax Items name size-1.
160 * @return name.
161 */
162 native ttt_get_item_name(item_id, name[], charsmax);
163
164 /**
165 * Gets item_id from item name.
166 *
167 * @param name[] Items name.
168 * @return Item id.
169 */
170 native ttt_get_item_id(name[]);
171
172 /**
173 * Checks if selected entity is setuped for DNA tracking.
174 *
175 * @param ent Entity id.
176 * @return True or false.
177 */
178 native ttt_is_item_setup(ent);
179
180 /**
181 * Logs your message to files.
182 *
183 * @param type Enum LOG_MESSAGES.
184 * @param msg[] Your message.
185 */
186 native ttt_logging(LOG_MESSAGES, msg[]);
187
188 /**
189 * Register cvar to file.
190 *
191 * @param name[] Cvar name.
192 * @param string[] Cvar value.
193 * @param description[] Cvar description.
194 * @return true/false.
195 */
196 native ttt_register_cvar(name[], string[], description[]);
197
198 /**
199 * Sets/gets player stats.
200 *
201 * @param id Players id.
202 * @param PLAYER_STATS Enum PLAYER_STATS.
203 * @param newvalue New value to set.
204 * @return stat.
205 */
206 native ttt_get_stats(id, PLAYER_STATS);
207 native ttt_set_stats(id, PLAYER_STATS, newvalue);
208
209 /**
210 * Sets/gets player warnings.
211 *
212 * @param id Player id.
213 * @param array[] Player warning array.
214 * @return true/false.
215 */
216 native ttt_get_warnings(id, array[]);
217 native ttt_set_warnings(id, array[]);
218
219 /**
220 * Sets/finds item as exception in karma reduction.
221 *
222 * @param item Item id.
223 * @return true/false.
224 */
225 native ttt_add_exception(item);
226 native ttt_find_exception(item);
227
228 /**
229 * Adds command to commands menu.
230 *
231 * @param name[] Commands name.
232 * @return Command id.
233 */
234 native ttt_command_add(name[]);
235
236 /**
237 * Called when player bought item.
238 *
239 * @param id Players id.
240 * @param item Item id.
241 * @param name[] Item name.
242 * @param price Item price.
243 */
244 forward ttt_item_selected(id, item, name[], price);
245
246 /**
247 * Called when player uses item from Backpack.
248 *
249 * @param id Players id.
250 * @param item Item id.
251 * @param name[] Item name.
252 */
253 forward ttt_item_backpack(id, item, name[]);
254
255 /**
256 * Called when game state changes.
257 *
258 * @param mode Gamestate.
259 */
260 forward ttt_gamemode(mode);
261
262 /**
263 * Called when winner is set.
264 *
265 * @param winner winner.
266 */
267 forward ttt_winner(winner);
268
269 /**
270 * Called when dead body is created.
271 *
272 * @param owner Player id.
273 * @param ent Entity id.
274 */
275 forward ttt_spawnbody(owner, ent);
276
277 /**
278 * Called when player interacts with bomb.
279 *
280 * @param id Player id.
281 * @param status BOMB_STATUS enum.
282 * @param ent Bomb entity.
283 */
284 forward ttt_bomb_status(id, status, ent);
285
286 /**
287 * Called when player choses command from menu.
288 *
289 * @param id Players id.
290 * @param itemid Menu id.
291 * @param name[] Item name.
292 */
293 forward ttt_command_selected(id, menuid, name[]);
294
295 /**
296 * Called TTT config files has been executed.
297 */
298 forward ttt_plugin_cfg();
299
300 #include <ttt_stocks>