-
Notifications
You must be signed in to change notification settings - Fork 0
/
jctf.inc
114 lines (102 loc) · 3.94 KB
/
jctf.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
#if defined _jctf_included
#endinput
#endif
#define _jctf_included
#pragma library jctf
/*
These are parsed in the iEvent var of the jctf_flag() forward.
*/
enum
{
/* Event | Forward variables used by event | Description of event */
FLAG_STOLEN = 0, /* iPlayer, iFlagTeam | iPlayer got iFlagTeam's flag from their base */
FLAG_PICKED, /* iPlayer, iFlagTeam | iPlayer picked iFlagTeam's flag from the ground */
FLAG_DROPPED, /* iPlayer, iFlagTeam | iPlayer dropped the iFlagTeam's flag by dying, disconnecting or manually */
FLAG_MANUALDROP, /* iPlayer, iFlagTeam | iPlayer dropped the iFlagTeam's flag manually (using /dropflag) */
FLAG_RETURNED, /* iPlayer, iFlagTeam, bAssist | iPlayer (bAssist ? "assisted on returning" : "returned") the iFlagTeam's flag */
FLAG_CAPTURED, /* iPlayer, iFlagTeam, bAssist | iPlayer (bAssist ? "assisted on capturing" : "captured") the iFlagTeam's flag */
FLAG_AUTORETURN, /* iFlagTeam | iFlagTeam's flag was automatically returned */
FLAG_ADMINRETURN /* iPlayer, iFlagTeam | iFlagTeam's flag was returned by admin iPlayer using the command */
};
/**
* This forward triggers when a team's flag changes status.
* This forward also triggers, for example, when a flag is captured, for the
* capturing player and also for the assisting ones, each having bAssist true/false acordingly.
*
* @param iEvent The event triggered (list above)
* @param iPlayer Index of player
* @param iFlagTeam The flag's team
* @param bool:bAssist Is true if the iPlayer is an assisting player for iEvent, false if not.
* @noreturn
*/
forward jctf_flag(iEvent, iPlayer, iFlagTeam, bool:bAssist);
/**
* This native returns the player's team
* NOTE: It doesn't check if player is actually a player, you could get plugin errors if you use it wrong.
*
* @param id Index of player
* @return Index of team
*/
native jctf_get_team(id);
/**
* This native returns if the player is carrying the flag
* NOTE: It doesn't check if player is actually a player, you could get plugin errors if you use it wrong.
*
* @param id Index of player
* @return 1 if player is carying the flag, 0 otherwise
*/
native jctf_get_flagcarrier(id);
/**
* This native returns if the player is carrying the flag
* NOTE: It doesn't check if player is actually a player, you could get plugin errors if you use it wrong.
*
* @param id Index of player
* @return Adrenaline of player
*/
native get_user_adrenaline(id)
/**
* This native returns if the player is carrying the flag
* NOTE: It doesn't check if player is actually a player, you could get plugin errors if you use it wrong.
*
* @param id Index of player
* @param iAdr Adrenaline to set
* @return don't return
*/
native set_user_adrenaline(id, iAdr)
/**
* This native returns if the player is carrying the flag
* NOTE: It doesn't check if player is actually a player, you could get plugin errors if you use it wrong.
*
* @param id Index of player
* @return don't return
*/
native display_main_menu(id)
/**
* This native returns if the player is carrying the flag
* NOTE: It doesn't check if player is actually a player, you could get plugin errors if you use it wrong.
*
* @param id Index of player
* @return don't return
*/
native display_shop(id)
/**
* This native returns if the player is carrying the flag
* NOTE: It doesn't check if player is actually a player, you could get plugin errors if you use it wrong.
*
* @return true if votemap is active, false otherwise
*/
native bool:is_votemap_alive()
/**
* This native returns if the player is carrying the flag
* NOTE: It doesn't check if player is actually a player, you could get plugin errors if you use it wrong.
*
* @noreturn
*/
native jctf_flag_sendhome()
/**
* This native returns if the player is carrying the flag
* NOTE: It doesn't check if player is actually a player, you could get plugin errors if you use it wrong.
*
* @noreturn
*/
native shop_add_item(const name[], cost, const function[])