[DEV] TF2 Item Info v1.2 (15.04.12)
What is it?
Natives:
Links:
Changelog: http://files.xpenia.org/sourcemod/tf2ii/
Download: Plugin (Source code)
Includes: tf2itemsinfo.inc
List of natives that could be useful for plugin devs.Optional:
TF2Items extension.How to configure?
Gamedata from TF2Items Randomizer.
Not possible.CVars & CMDs:
PHP Code:
sm_tf2ii_version // version
// commands
sm_tf2ii_refresh // rescan items_game.txt
PHP Code:
/**
* @brief Is item exists in items_game.txt
*
* @param iItemDefinitionIndex -
*
* @return True if is it, false otherwose
**/
native bool:TF2II_IsValidItemID( iItemDefinitionIndex );
/**
* @brief Get item class
*
* @param iItemDefinitionIndex -
* @param strItemClass String to store item class
* @param iItemClassLength String length
*
* @noreturn
**/
native TF2II_GetItemClassByID( iItemDefinitionIndex, String:strItemClass[], iItemClassLength );
/**
* @brief Get item's slot number
*
* @param iItemDefinitionIndex -
*
* @return Item slot number
**/
native _:TF2II_GetItemSlotByID( iItemDefinitionIndex );
/**
* @brief Get item slot name
*
* @param iItemDefinitionIndex -
* @param strItemSlot String to store item slot
* @param iItemSlotLength String length
*
* @noreturn
**/
native TF2II_GetItemSlotNameByID( iItemDefinitionIndex, String:strItemSlot[], iItemSlotLength );
/**
* @brief Is item paintable?
*
* @param iItemDefinitionIndex -
*
* @return True if paintable, false otherwise
**/
native bool:TF2II_IsItemUsedByClass( iItemDefinitionIndex, iClass );
/**
* @brief Is item paintable?
*
* @param iItemDefinitionIndex -
*
* @return True if paintable, false otherwise
**/
native bool:TF2II_IsItemPaintable( iItemDefinitionIndex );
/**
* @brief Get number of attributes
*
* @param iItemDefinitionIndex -
*
* @return Number of attributes
**/
native _:TF2II_GetItemNumAttributes( iItemDefinitionIndex );
/**
* @brief -
*
* @param iItemDefinitionIndex -
* @param iSlotAttribute The attribute slot index, ranges from 0 to 15
* @param strAttributeName String to store attribute name
* @param iAttributeNameLength String length
*
* @return The attribute name; empty on failure
**/
native TF2II_GetItemAttributeName( iItemDefinitionIndex, iSlotAttribute, String:strAttributeName[], iAttributeNameLength );
/**
* @brief -
*
* @param iItemDefinitionIndex -
* @param iSlotAttribute The attribute slot index, ranges from 0 to 15
*
* @return The attribute ID; -1 on failure
**/
native _:TF2II_GetItemAttributeID( iItemDefinitionIndex, iSlotAttribute );
/**
* @brief -
*
* @param iItemDefinitionIndex -
* @param iSlotAttribute The attribute slot index, ranges from 0 to 15
*
* @return Attribute value
**/
native Float:TF2II_GetItemAttributeValue( iItemDefinitionIndex, iSlotAttribute );
/**
* @brief Get attribute name by ID
*
* @param strAttributeName String to store attribute name
* @param iAttributeNameLength String length
*
* @return Attribute ID on success, -1 otherwise
**/
native _:TF2II_GetAttributeIDByName( const String:strAttributeName[] );
/**
* @brief Get attribute name by ID
*
* @param iAttributeID -
* @param strAttributeName String to store attribute name
* @param iAttributeNameLength String length
*
* @return True on success, false otherwise
**/
native bool:TF2II_GetAttributeNameByID( iAttributeID, String:strAttributeName[], iAttributeNameLength );
/**
* @brief -
*
* @param hResults DataPack to store items IDs
* @param strItemClass Item class name
* @param iItemSlot Item slot number
* @param bFilterClass Should we check class or not
* @param bUsedByClasses Array of classes with rights (example: bUsedByClasses[0]=true meaning that we should find items which scout can equip)
*
* @return Number of results; -1 on error
**/
native _:TF2II_FindItemsIDsByCond( &Handle:hResults, const String:strItemClass[] = "", iItemSlot = -1, const String:strItemSlot[] = "", bool:bFilterClass = nope, bool:bUsedByClasses[10] = { nope, ... } );
/**
* @brief Get item based on items_game.txt
*
* @param iItemDefinitionIndex -
* @param hItem -
* @param iQuality (see TF2ItemQuality_ above)
* @param iLevel Item level (from 1 to 127)
*
* @return True on success, false otherwise
**/
native bool:TF2II_GetNamedItem( iItemDefinitionIndex, &Handle:hItem, iQuality = TF2ItemQuality_Unique, iLevel = 1 );
/**
* @brief Give item based on items_game.txt
*
* @param iClient Target
* @param iItemDefinitionIndex -
* @param iQuality (see TF2ItemQuality_ above)
* @param iLevel Item level (from 1 to 127)
*
* @return True on success, false otherwise
**/
native bool:TF2II_GiveNamedItem( iClient, iItemDefinitionIndex, iQuality = TF2ItemQuality_Unique, iLevel = 1 );
Changelog: http://files.xpenia.org/sourcemod/tf2ii/
Download: Plugin (Source code)
Includes: tf2itemsinfo.inc
Orignal From: [DEV] TF2 Item Info v1.2 (15.04.12)
Post a Comment