fcs.inc
Original include source with line numbers.
| 1 | #if defined _fcs_included |
| 2 | #endinput |
| 3 | #endif |
| 4 | |
| 5 | #define _fcs_included |
| 6 | |
| 7 | |
| 8 | |
| 9 | /* |
| 10 | * Returns a players credits |
| 11 | * |
| 12 | * @param client - The player index to get points of |
| 13 | * |
| 14 | * @return The credits client |
| 15 | * |
| 16 | */ |
| 17 | |
| 18 | native fcs_get_user_credits(client); |
| 19 | |
| 20 | /* |
| 21 | * Sets <credits> to client |
| 22 | * |
| 23 | * @param client - The player index to set points to |
| 24 | * @param credits - The amount of credits to set to client |
| 25 | * |
| 26 | * @return The credits of client |
| 27 | * |
| 28 | */ |
| 29 | |
| 30 | native fcs_set_user_credits(client, credits); |
| 31 | |
| 32 | /* |
| 33 | * Adds <credits> points to client |
| 34 | * |
| 35 | * @param client - The player index to add points to |
| 36 | * @param credits - The amount of credits to add to client |
| 37 | * |
| 38 | * @return The credits of client |
| 39 | * |
| 40 | */ |
| 41 | |
| 42 | stock fcs_add_user_credits(client, credits) |
| 43 | { |
| 44 | return fcs_set_user_credits(client, fcs_get_user_credits(client) + credits); |
| 45 | } |
| 46 | |
| 47 | /* |
| 48 | * Subtracts <credits> from client |
| 49 | * |
| 50 | * @param client - The player index to subtract points from |
| 51 | * @param credits - The amount of credits to substract from client |
| 52 | * |
| 53 | * @return The credits of client |
| 54 | * |
| 55 | */ |
| 56 | |
| 57 | stock fcs_sub_user_credits(client, credits) |
| 58 | { |
| 59 | return fcs_set_user_credits(client, fcs_get_user_credits(client) - credits); |
| 60 | } |