AMXX-BG.INFO credits.inc Raw include

credits.inc

Original include source with line numbers.

Back Download .inc
1 #if defined _credits_included
2 #endinput
3 #endif
4 #define _credits_included
5
6 /**
7 * Returns whether Credits is active.
8 */
9 stock is_credits_active()
10 {
11 if(!cvar_exists("bb_credits_active"))
12 {
13 log_amx("Cvar: ^"bb_credits_active^" does not exist.")
14 return 0;
15 }
16 return 1;
17 }
18
19 /**
20 * Returns a users credits.
21 *
22 * @param id Player index.
23 * @return Returns current credits
24 */
25 native credits_get_user_credits(id)
26
27 /**
28 * Sets a users credits to the desired amount.
29 *
30 * @param id Player index.
31 * @param credits Credit amount.
32 * @return Returns current credits
33 */
34 native credits_set_user_credits(id, credits)
35
36 /**
37 * Adds an amount to a users credits.
38 *
39 * @param id Player index.
40 * @param credits Adds this amount to current credits.
41 * @return Returns current credits
42 */
43 native credits_add_user_credits(id, credits)
44
45 /**
46 * Subtracts an amount to a users credits.
47 *
48 * @param id Player index.
49 * @param credits Subtracts this amount from current credits.
50 * @return Returns current credits
51 */
52 native credits_subtract_user_credits(id, credits)
53
54 /**
55 * Returns a users current credits goal.
56 *
57 * @param id Player index.
58 * @return Returns current goal
59 */
60 native credits_get_user_goal(id)
61
62 /**
63 * Sets a users current credits goal..
64 *
65 * @param id Player index.
66 * @param credits Amount to get goal to.
67 * @return Returns current goal
68 */
69 native credits_set_user_goal(id, credits)
70
71 /**
72 * Opens the unlocks menu for the player specified..
73 *
74 * @param id Player index.
75 */
76 native credits_show_unlocksmenu(id)
77
78 /**
79 * Opens the guns menu for the player specified..
80 *
81 * @param id Player index.
82 */
83 native credits_show_gunsmenu(id)
84 /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
85 *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
86 */
87