cshop_register_item
Registers a new item.
Syntax
native cshop_register_item(id[], name[], price, limit = 0, sound[] = DEFAULT_SOUND, Float:duration = 0.0, points = 0, team = 0, flag[] = "") #define cshopRegisterItem cshop_register_item /** * Checks whether a player has an item or not. * * @param id Player's index. * @param item Item ID. * @return True if he has, false if he hasn't. */ native bool:cshop_has_item(id, item) #define cshopHasItem cshop_has_item /** * Checks whether the points system is enabled. * * @return True if it is, false if it isn't. */ native bool:cshop_points_enabled() #define cshopPointsEnabled cshop_points_enabled /** * Checks player's item limit. * * @param id Player's index. * @param item Item ID. * @return Player's item limit. */ native cshop_get_limit(id, item) #define cshopGetLimit cshop_get_limit
Usage
| id | Item short name (id). |
| name | Item name. |
| price | Item price. |
| limit | Item limit. |
| sound | Sound when buying the item. |
| duration | If you want the item to be removed after X seconds, instead of right away. |
| points | If you want to change the price with points. |
| team | If you want it to be available for a specific team only. |
| flag | If you want only players with a specific flag to be able to buy the item. |
Return
Item — ID.
Defined in
customshop.inc
at line 63
.
This documentation was automatically generated from source.