AMXX-BG.INFO hnsxp.inc Raw include

hnsxp.inc

Original include source with line numbers.

Back Download .inc
1 #if defined _hns_xp_included
2 #endinput
3 #endif
4 #define _hns_xp_included
5
6 #if AMXX_VERSION_NUM >= 175
7 #pragma reqlib hns_xp
8 #if !defined AMXMODX_NOAUTOLOAD
9 #pragma loadlib hns_xp
10 #endif
11 #else
12 #pragma library hns_xp
13 #endif
14
15 /*
16 * Registers a new ability
17 *
18 * @param name - The name of the ability
19 *
20 * @return The pointer of that ability
21 *
22 */
23 native hnsxp_register_ability(name[]);
24
25 /*
26 * Registers a new item for an ability
27 *
28 * @param ability - The pointer of the ability
29 * @param name - The name of the item
30 * @param save_name - The name used to save for each client (must be unique amongst every other item for any ability and cannot be "xp")
31 * @param value_type - The type of value for this ability (eg. "%" for "32%", " HP" for "100 HP").
32 * This will be placed directly after the value of the item, so for example in the health, there was a space before HP.
33 * @param first_xp - The first xp to buy the first level
34 * @param xp_interval - The interval of xp between levels.
35 * Use a positive value for your own interval.
36 * Use XP_INTERVAL_NONE for the "first_xp" value as each interval.
37 * Use XP_INTERVAL_EXPONENTIAL for the xp to double for each level. (default)
38 * @param max_level - The maximum level for this item
39 * @param max_value - The value for this item that is used when the player has reached the maximum level
40 *
41 * @return The pointer of that item
42 *
43 */
44
45 native hnsxp_register_item(const ability, const name[], const save_name[], const value_type[], const first_xp, const xp_interval, const max_level, const max_value);
46
47 /*
48 * Adds a description to the ability.
49 *
50 * @param ability - The pointer of the ability
51 * @param description - The description of the ability (use multiple times for multiple lines).
52 * Has a character limit of 256.
53 *
54 * @return No return.
55 *
56 */
57 native hnsxp_describe_ability(const ability, const description[]);
58
59 /*
60 * Called whenever a player's level for a certain ability's item changes
61 *
62 * @param ability - The pointer of the ability
63 * @param item - The pointer of the item
64 * @param client - The player index who's level changed
65 * @param level - The level of the player's item for this ability.
66 *
67 * @return No return will change the action of this forward.
68 *
69 */
70 forward hnsxp_update_user_level(const ability, const item, const client, const level);
71
72 /*
73 * Returns a players XP points
74 *
75 * @param client - The player index to get points of
76 *
77 * @return The XP points of client
78 *
79 */
80 native hnsxp_get_user_xp(const client);
81
82 /*
83 * Sets <xp> points to client
84 *
85 * @param client - The player index to set points to
86 * @param xp - The amount of XP points to set to client
87 *
88 * @return The XP points of client
89 *
90 */
91 native hnsxp_set_user_xp(const client, const xp);
92
93 /*
94 * Returns a players XP points from a given authid
95 *
96 * @param authid - The authid of the player to get points from
97 *
98 * @return The XP points of the player
99 *
100 */
101 native hnsxp_get_authid_xp(const authid[]);
102
103 /*
104 * Sets <xp> points to client
105 *
106 * @param authid - The authid of the player to set points to
107 * @param xp - The amount of XP points to set to the player
108 *
109 * @return The XP points of the player
110 *
111 */
112 native hnsxp_set_authid_xp(const authid[], const xp);
113
114 /*
115 * Prints a message from the xp plugin
116 *
117 * @param receiver - The player index to print the message to (0 = everyone)
118 * @param message - The message to be printed (supports formatting and colorchat - ^1, ^3, ^4)
119 *
120 * @return No return.
121 *
122 */
123 native hnsxp_print(const receiver, const message[], any:...);
124
125 #include <hnsxp_const>
126 #include <hnsxp_stocks>
127 /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
128 *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang11274\\ f0\\ fs16 \n\\ par }
129 */
130