Added PlayerRunCmd hook to sdktools (
bug 3289, r=dvander)
1 #if defined _mapchooser_included_
4 #define _mapchooser_included_
8 Nominate_Added, /** The map was added to the nominate list */
9 Nominate_Replaced, /** A clients existing nomination was replaced */
10 Nominate_AlreadyInVote, /** Specified map was already in the vote */
11 Nominate_InvalidMap, /** Mapname specifed wasn't a valid map */
12 Nominate_VoteFull, /** This will only occur if force was set to false */
17 MapChange_Instant, /** Change map as soon as the voting results have come in */
18 MapChange_RoundEnd, /** Change map at the end of the round */
19 MapChange_MapEnd, /** Change the sm_nextmap cvar */
23 * Attempt to add a map to the mapchooser map list.
25 * @param map Map to add.
26 * @param force Should we force the map in even if it requires overwriting an existing nomination?
27 * @param owner Client index of the nominater. If the client disconnects the nomination will be removed. Use 0 for constant nominations
28 * @return Nominate Result of the outcome
30 native NominateResult:NominateMap(const String:map[], bool:force, owner);
33 * Gets the current list of excluded maps.
35 * @param array An ADT array handle to add the map strings to. Needs to be
38 native GetExcludeMapList(Handle:array);
41 * Checks if MapChooser will allow a vote
43 * @return True if a vote can be held, or false if mapchooser is already holding a vote.
45 native bool:CanMapChooserStartVote();
48 * Initiates a MapChooser map vote
50 * Note: If no input array is specified mapchooser will use its internal list. This includes
51 * any nominations and excluded maps (as per mapchoosers convars).
53 * @param when MapChange consant of when the resulting mapchange should occur.
54 * @param inputarray ADT array list of maps to add to the vote.
56 native InitiateMapChooserVote(MapChange:when, Handle:inputarray=INVALID_HANDLE);
59 * Checks if MapChooser's end of map vote has completed.
61 * @return True if complete, false otherwise.
63 native bool:HasEndOfMapVoteFinished();
66 * Checks if MapChooser is set to run an end of map vote.
68 * @return True if enabled, false otherwise.
70 native bool:EndOfMapVoteEnabled();
73 * Called when mapchooser removes a nomination from its list.
74 * Nominations cleared on map start will not trigger this forward
76 forward OnNominationRemoved(const String:map[], owner);
79 public SharedPlugin:__pl_mapchooser =
82 file = "mapchooser.smx",
83 #if defined REQUIRE_PLUGIN
90 public __pl_mapchooser_SetNTVOptional()
92 MarkNativeAsOptional("NominateMap");
93 MarkNativeAsOptional("GetExcludeMapList");
94 MarkNativeAsOptional("CanMapChooserStartVote");
95 MarkNativeAsOptional("InitiateMapChooserVote");
96 MarkNativeAsOptional("HasEndOfMapVoteFinished");
97 MarkNativeAsOptional("EndOfMapVoteEnabled");