Cstrike: Implement CS_OnBuyAttempt forward.

This commit is contained in:
Arkshine
2014-07-04 10:33:55 +02:00
parent 0728fee706
commit 6c4cb27d3e
5 changed files with 40 additions and 4 deletions

View File

@ -357,7 +357,7 @@ forward CS_InternalCommand(id, const cmd[]);
/**
* The following constants are used with CS_OnBuy forward.
* The following constants are used with CS_OnBuy[Attempt] forwards.
*/
#define CSI_P228 CSW_P228
#define CSI_SCOUT CSW_SCOUT
@ -397,9 +397,22 @@ forward CS_InternalCommand(id, const cmd[]);
/**
* Called when a player attempts to purchase an item.
* Return PLUGIN_CONTINUE to allow the purchase or return a higher action to deny.
* This is ususally called right away on buy commands issued by a player.
*
* @note Return PLUGIN_CONTINUE to allow the purchase or return a higher action to deny.
*
* @param index Player index.
* @param item Item index, see CSI_* constants.
*/
forward CS_OnBuy(index, item);
forward CS_OnBuyAttempt(index, item);
/**
* Called when a player purchases an item.
* This usually called right before a player gets the purchased item.
*
* @note Return PLUGIN_CONTINUE to allow the purchase or return a higher action to deny.
*
* @param index Player index.
* @param item Item index, see CSI_* constants.
*/
forward CS_OnBuy(index, item);