Skip to content
Federico Matías edited this page Jul 21, 2023 · 5 revisions

Natives

/**
* Return the current mod index based on JSON position.
*
* @return (int)        Index of the current mod.
*/
native mm_get_mod_id();

/**
* Retrieves mod name.
*
* @note If the destination buffer is too small to hold the source string, the 
*       destination will be truncated.
*
* @param iModId        Mod index.
* @param szOutput      Buffer to copy mod name to.
* @param iLen          Buffer size.
*
* @return (int)        -1 on error.
*                      >= 0 Number of cells written.
*/
native mm_get_mod_name(const iModId, szOutput[], const iLen);

/**
* Retrieves mod tag.
*
* @note If the destination buffer is too small to hold the source string, the 
*       destination will be truncated.
*
* @param iModId        Mod index.
* @param szOutput      Buffer to copy mod tag to.
* @param iLen          Buffer size.
*
* @return (int)        -1 on error.
*                      >= 0 Number of cells written.
*/
native mm_get_mod_tag(const iModId, szOutput[], const iLen);

/**
* Return the next mod index based on JSON position if nextmod is already chosen.
*
* @return (int)        -1 if nextmod is not chosen yet.
*                      >= 0 Index of the next mod.
*/
native mm_get_nextmod_id();

/**
* Retrieves next mod name.
*
* @note If the destination buffer is too small to hold the source string, the 
*       destination will be truncated.
*
* @param szOutput      Buffer to copy mod name to.
* @param iLen          Buffer size.
*
* @return (int)        -1 on error.
*                      >= 0 Number of cells written.
*/
native mm_get_nextmod_name(szOutput[], const iLen);

/**
* Force a votemod.
*
* @return (int)        1 on success, 0 otherwise
*/
native mm_force_votemod();

Forwards

/**
* Called when a votemod gets started
*
* @param bSecondVote   True if this is the second votemod for tiebreaker
*/
forward multimod_start_votemod(const bool:bSecondVote);

/**
* Called when a votemod gets ended
*
* @param bSecondVote   True if this is the second votemod for tiebreaker
*/
forward multimod_end_votemod(const bool:bSecondVote);

/**
* Called when a votemap gets started
*
* @param bSecondVote   True if this is the second votemap for tiebreaker
*/
forward multimod_start_votemap(const bool:bSecondVote);

/**
* Called when a votemap gets ended
*
* @param bSecondVote   True if this is the second votemap for tiebreaker
*/
forward multimod_end_votemap(const bool:bSecondVote);

/**
* Called when a admin forces a votemod
*
* @param iAdminId      Admin index
*
* @return              PLUGIN_CONTINUE to let the admin force a votemod
*                      PLUGIN_HANDLED or higher to stop the admin from forcing a votemod
*/
forward multimod_admin_force_votemod(const iAdminId);
Clone this wiki locally