This repository has been archived by the owner on Apr 24, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d19b608
commit b713a82
Showing
1 changed file
with
79 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,80 +1,80 @@ | ||
#if defined _afk_protection_included | ||
#endinput | ||
#endif | ||
|
||
#define _afk_protection_included | ||
|
||
/** | ||
* Checks if player is has AFK protection active or not. | ||
* | ||
* @param id Player index | ||
* | ||
* @return True, if player is AFK, false otherwise | ||
*/ | ||
native bool:apr_get_player_afk(id); | ||
|
||
/** | ||
* Activate or deactivate player's AFK protection. | ||
* | ||
* @param id Player index | ||
* @param bSet True - enable protection. false - disable | ||
* | ||
* @return True if AFK protection has sucsessfuly activateed or deactivated, | ||
* false otherwise. | ||
*/ | ||
native apr_set_player_afk(id, bool:bSet); | ||
|
||
/** | ||
* Checks if player is has OFF AFK protection or not. | ||
* | ||
* @param id Player index | ||
* | ||
* @return True, if player is OFF AFK protection, false otherwise | ||
*/ | ||
native bool:apr_get_player_status(id); | ||
|
||
/** | ||
* Turn ON or OFF checks for afk for player. | ||
* | ||
* @param id Player index | ||
* @param bSet True - disable checks. false - enable | ||
* | ||
* @return Player's status | ||
*/ | ||
native apr_set_player_status(id, bool:bSet); | ||
|
||
/** | ||
* Called before a player will become AFK | ||
* | ||
* @param id Index of a player | ||
* | ||
* @noreturn | ||
*/ | ||
forward OnPlayerBecameAFK_pre(const id); | ||
|
||
/** | ||
* Called after a player has become AFK | ||
* | ||
* @param id Index of a player | ||
* | ||
* @noreturn | ||
*/ | ||
forward OnPlayerBecameAFK_post(const id); | ||
|
||
/** | ||
* Called before a player will be back from AFK mode | ||
* | ||
* @param id Index of a player | ||
* | ||
* @noreturn | ||
*/ | ||
forward OnPlayerBack_pre(const id); | ||
|
||
/** | ||
* Called after a player is back from AFK mode | ||
* | ||
* @param id Index of a player | ||
* | ||
* @noreturn | ||
*/ | ||
#if defined _afk_protection_included | ||
#endinput | ||
#endif | ||
|
||
#define _afk_protection_included | ||
|
||
/** | ||
* Checks if player is has AFK protection active or not. | ||
* | ||
* @param id Player index | ||
* | ||
* @return True, if player is AFK, false otherwise | ||
*/ | ||
native bool:apr_get_player_afk(id); | ||
|
||
/** | ||
* Activate or deactivate player's AFK protection. | ||
* | ||
* @param id Player index | ||
* @param bSet True - enable protection. false - disable | ||
* | ||
* @return True if AFK protection has sucsessfuly activateed or deactivated, | ||
* false otherwise. | ||
*/ | ||
native apr_set_player_afk(id, bool:bSet); | ||
|
||
/** | ||
* Checks if player is has OFF AFK protection or not. | ||
* | ||
* @param id Player index | ||
* | ||
* @return True, if player is OFF AFK protection, false otherwise | ||
*/ | ||
native bool:apr_get_player_status(id); | ||
|
||
/** | ||
* Turn ON or OFF checks for afk for player. | ||
* | ||
* @param id Player index | ||
* @param bSet True - disable checks. false - enable | ||
* | ||
* @return Player's status | ||
*/ | ||
native apr_set_player_status(id, bool:bSet); | ||
|
||
/** | ||
* Called before a player will become AFK | ||
* | ||
* @param id Index of a player | ||
* | ||
* @noreturn | ||
*/ | ||
forward OnPlayerBecameAFK_pre(const id); | ||
|
||
/** | ||
* Called after a player has become AFK | ||
* | ||
* @param id Index of a player | ||
* | ||
* @noreturn | ||
*/ | ||
forward OnPlayerBecameAFK_post(const id); | ||
|
||
/** | ||
* Called before a player will be back from AFK mode | ||
* | ||
* @param id Index of a player | ||
* | ||
* @noreturn | ||
*/ | ||
forward OnPlayerBack_pre(const id); | ||
|
||
/** | ||
* Called after a player is back from AFK mode | ||
* | ||
* @param id Index of a player | ||
* | ||
* @noreturn | ||
*/ | ||
forward OnPlayerBack_post(const id); |