cs_weap_restrict_api.inc

Original include source with line numbers.

Back Download .inc
1 #if defined _cs_weap_restrict_api_included
2 #endinput
3 #endif
4 #define _cs_weap_restrict_api_included
5
6 #if AMXX_VERSION_NUM >= 175
7 #pragma reqlib cs_weap_restrict_api
8 #if !defined AMXMODX_NOAUTOLOAD
9 #pragma loadlib cs_weap_restrict_api
10 #endif
11 #else
12 #pragma library cs_weap_restrict_api
13 #endif
14
15 /**
16 * Enables/disables weapon restrictions for a specific player.
17 *
18 * Note: if you pass an empty bitsum, all weapons will be restricted.
19 *
20 * @param id Player index.
21 * @param set True to enable, false to remove restrictions.
22 * @param allowed_bitsum Bitsum containing allowed weapons.
23 * @param allowed_default Default allowed weapon to switch back to. (in CSW_ format)
24 */
25 native cs_set_player_weap_restrict(id, set, allowed_bitsum = 0, allowed_default = 0)
26
27 /**
28 * Returns whether a player has weapon restrictions enabled. In the case
29 * that he does, also returns allowed_bistum and allowed_default (by referenced).
30 *
31 * @param id Player index.
32 * @param allowed_bitsum Bitsum containing allowed weapons.
33 * @param allowed_default Default allowed weapon to switch back to. (in CSW_ format)
34 * @return True if restrictions are enabled, false otherwise.
35 */
36 native cs_get_player_weap_restrict(id, &allowed_bitsum=0, &allowed_default=0)
37