-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathconfoglcompmod.inc
More file actions
134 lines (123 loc) · 4.97 KB
/
Copy pathconfoglcompmod.inc
File metadata and controls
134 lines (123 loc) · 4.97 KB
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
/* *
* =============================================================================
* Confogl.inc
* Confogl (C)2011 Confogl Team
* =============================================================================
*
* This file is part of the Confogl competitive L4D2 plugin suite.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, version 3.0, as published by the
* Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*
* As a special exception, Confogl Team gives you permission to link the
* code of this program (as well as its derivative works) to "Half-Life 2," the
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
* by the Valve Corporation. You must obey the GNU General Public License in
* all respects for all other code used. Additionally, Confogl Team grants
* this exception to all derivative works. Confogl defines further
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
* or <http://www.sourcemod.net/license.php>.
*
*/
#if defined _confoglcompmod_included
#endinput
#endif
#define _confoglcompmod_included
/**
* @brief Tells if map data is available
* @remarks Map data should be available when any map is loaded, after OnMapStart()
*
* @return True if map data is available, false if it is not.
*/
native bool LGO_IsMapDataAvailable();
/**
* @brief Get an Int value from the MapInfo keyvalues for the current map with a specific key
* @remarks Mapinfo keyvalues is used to store static data about maps
*
* @param key Key to read the value from
* @param defvalue Default value to return if key is not found (default 0)
* @return Integer value for given key, or defvalue if key is not found
*/
native int LGO_GetMapValueInt(const char[] key, const int defvalue = 0);
/**
* @brief Get a Float value from the MapInfo keyvalues for the current map with a specific key
* @remarks Mapinfo keyvalues is used to store static data about maps
*
* @param key Key to read the value from
* @param defvalue Default value to return if key is not found (default 0.0)
* @return Float value for given key, or defvalue if key is not found
*/
native float LGO_GetMapValueFloat(const char[] key, const float defvalue = 0.0);
/**
* @brief Get a Vector from the MapInfo keyvalues for the current map with a specific key
* @remarks Mapinfo keyvalues is used to store static data about maps
*
* @param key Key to read the value from
* @param vector Vector to store the result in
* @param defvalue Default value to use if key is not found (default NULL_VECTOR)
* @noreturn
*/
native void LGO_GetMapValueVector(const char[] key, float vector[3], const float defvalue[3] = NULL_VECTOR);
/**
* @brief Get a String from the MapInfo keyvalues for the current map with a specific key
* @remarks Mapinfo keyvalues is used to store static data about maps
*
* @param key Key to read the value from
* @param value String to store the result in
* @param maxlength Maximum length to write to the value String buffer
* @param defvalue Default value to use if key is not found (default "")
* @noreturn
*/
native void LGO_GetMapValueString(const char[] key, char[] value, int maxlength, const char[] defvalue = "");
/**
* @brief Copy a Subsection from the MapInfo keyvalues for the current map
* @remarks Mapinfo keyvalues is used to store static data about maps
*
* @param kv KeyValues Handle to copy to
* @param section Name of the section to copy
* @noreturn
*/
native void LGO_CopyMapSubsection(KeyValues kv, const char[] section);
/**
* @brief Informs if the module 'ScoreMod' is activated now (confogl activated and scoremod activated)
* @return (bool) returns true if activated, false otherwise
*/
native bool LGO_IsScoremodEnabled();
/**
* @brief Returns the amount of bonus if the module 'Scoremod' is activated
* @return (int) bonus amount, or return -1 if confogl disable or scoremod disable
*/
native int LGO_GetHealthScore();
// which means you have to use this plugin.
public SharedPlugin __pl_confoglcompmod =
{
name = "confogl",
file = "confoglcompmod.smx",
#if defined REQUIRE_PLUGIN
required = 1,
#else
required = 0,
#endif
};
#if !defined REQUIRE_PLUGIN
public void __pl_confoglcompmod_SetNTVOptional()
{
MarkNativeAsOptional("LGO_IsMapDataAvailable");
MarkNativeAsOptional("LGO_GetMapValueInt");
MarkNativeAsOptional("LGO_GetMapValueFloat");
MarkNativeAsOptional("LGO_GetMapValueVector");
MarkNativeAsOptional("LGO_GetMapValueString");
MarkNativeAsOptional("LGO_CopyMapSubsection");
MarkNativeAsOptional("LGO_IsScoremodEnabled");
MarkNativeAsOptional("LGO_GetHealthScore");
}
#endif