AMXX-BG.INFO weapon_chance.inc Raw include

weapon_chance.inc

Original include source with line numbers.

Back Download .inc
1 #if defined _weapon_chance_included
2 #endinput
3 #endif
4
5 #define _weapon_chance_included
6
7 #if AMXX_VERSION_NUM >= 175
8 #pragma reqlib weapon_chance
9 #if !defined AMXMODX_NOAUTOLOAD
10 #pragma loadlib weapon_chance
11 #endif
12 #else
13 #pragma library weapon_chance
14 #endif
15
16 /*
17 * Adds an item to the chance list when player spawns
18 *
19 * @param teams - The team value for the item (use WC_TEAMS_* constant)
20 * @param chance - The percentage of getting the item (0-100)
21 * @param announce - true to tell all players if player got item, false to only tell the player who got it
22 *
23 * @return Returns a unique item index (item_id)
24 *
25 */
26 enum
27 {
28 WC_TEAMS_ALL,
29 WC_TEAMS_T,
30 WC_TEAMS_CT
31 };
32 native wc_add(const teams, const chance, const bool:announce);
33
34 /*
35 * Called when the core plugin is given player the item
36 *
37 * @param player_id - The index of player who is getting the item
38 * @param item_id - The item index
39 *
40 * @return PLUGIN_HANDLED will stop the item from being given, PLUGIN_CONTINUE will say it was given to player
41 *
42 */
43 forward wc_give_item(player_id, item_id);
44
45 /*
46 * Called when the core plugin is checking if player has item
47 *
48 * @param player_id - The index of player to check for the item
49 * @param item_id - The item index
50 *
51 * @return 1 if player has item, 0 otherwise
52 *
53 */
54 forward wc_has_item(player_id, item_id);
55
56 /*
57 * Called when the core plugin needs the name of the item being given
58 *
59 * @param player_id - The index of player who is getting the item
60 * @param item_id - The item index
61 * @param message - The string that needs to be formatted
62 *
63 * @return No return
64 *
65 */
66 forward wc_format_message(player_id, item_id, message[64]);
67 /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
68 *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang11274\\ f0\\ fs16 \n\\ par }
69 */
70