-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathwarden.inc
86 lines (68 loc) · 2.22 KB
/
warden.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
#if defined _warden_included
#endinput
#endif
#define _warden_included
public SharedPlugin __pl_warden =
{
name = "warden",
file = "warden.smx",
#if defined REQUIRE_PLUGIN
required = 1,
#else
required = 0,
#endif
};
#if !defined REQUIRE_PLUGIN
public __pl_warden_SetNTVOptional()
{
MarkNativeAsOptional("warden_exist");
MarkNativeAsOptional("warden_iswarden");
MarkNativeAsOptional("warden_set");
MarkNativeAsOptional("warden_remove");
}
#endif
/*********************************************************
* Called everytime the warden position become free.
* On wardens dead, disconnect, removed...
*
* @param client The client who was warden
* @NoReturn
*********************************************************/
forward void warden_OnWardenRemoved(int client);
/*********************************************************
* Called when a client become warden
* By player, admin, randomchoose...
*
* @param client The client who become warden
* @NoReturn
*********************************************************/
forward void warden_OnWardenCreated(int client);
/*********************************************************
* Checks if any warden exist
*
*
* @return true on match, false if not
*********************************************************/
native bool warden_exist();
/*********************************************************
* returns if client is warden
*
* @param client The client to run the check on
* @return true on match, false if not
*********************************************************/
native bool warden_iswarden(int client);
/*********************************************************
* Set a client as warden
*
* @param client The client to set as warden
* @param caller The client who set the new warden
* @NoReturn
*********************************************************/
native void warden_set(int client, int caller);
/*********************************************************
* Removes the current warden if he exists
*
* @param client The warden client to remove
* @NoReturn
*********************************************************/
native void warden_remove(int client);