1.1 --- a/plugins/include/cstrike.inc Tue Jun 28 20:26:40 2011 -0400
1.2 +++ b/plugins/include/cstrike.inc Tue Jun 28 20:32:55 2011 -0400
1.3 @@ -65,6 +65,43 @@
1.4 CSRoundEnd_GameStart // Game Commencing!
1.5 };
1.6
1.7 +enum CSWeaponID
1.8 +{
1.9 + CSWeapon_NONE,
1.10 + CSWeapon_P228,
1.11 + CSWeapon_GLOCK,
1.12 + CSWeapon_SCOUT,
1.13 + CSWeapon_HEGRENADE,
1.14 + CSWeapon_XM1014,
1.15 + CSWeapon_C4,
1.16 + CSWeapon_MAC10,
1.17 + CSWeapon_AUG,
1.18 + CSWeapon_SMOKEGRENADE,
1.19 + CSWeapon_ELITE,
1.20 + CSWeapon_FIVESEVEN,
1.21 + CSWeapon_UMP45,
1.22 + CSWeapon_SG550,
1.23 + CSWeapon_GALIL,
1.24 + CSWeapon_FAMAS,
1.25 + CSWeapon_USP,
1.26 + CSWeapon_AWP,
1.27 + CSWeapon_MP5NAVY,
1.28 + CSWeapon_M249,
1.29 + CSWeapon_M3,
1.30 + CSWeapon_M4A1,
1.31 + CSWeapon_TMP,
1.32 + CSWeapon_G3SG1,
1.33 + CSWeapon_FLASHBANG,
1.34 + CSWeapon_DEAGLE,
1.35 + CSWeapon_SG552,
1.36 + CSWeapon_AK47,
1.37 + CSWeapon_KNIFE,
1.38 + CSWeapon_P90,
1.39 + CSWeapon_SHIELD,
1.40 + CSWeapon_KEVLAR,
1.41 + CSWeapon_ASSAULTSUIT,
1.42 + CSWeapon_NIGHTVISION
1.43 +};
1.44 /**
1.45 * Called when a player attempts to purchase an item.
1.46 * Return Plugin_Continue to allow the purchase or return a
1.47 @@ -166,6 +203,19 @@
1.48 */
1.49 native CS_GetTranslatedWeaponAlias(const String:alias[], String:weapon[], size);
1.50
1.51 + /**
1.52 + * Gets a weapon's price
1.53 + *
1.54 + * @param client Client to check weapon price for.
1.55 + * @param id Weapon id for the weapon to check
1.56 + * @param defaultprice Set to true to get defaultprice.
1.57 + * @return Returns price of the weapon (even if modified)
1.58 + *
1.59 + * @error Invalid client, failing to get weapon info, or failing to get price offset.
1.60 + * @note Not all "weapons" will return their default price. Example: c4, knife, vest, vest helmet, night vision.
1.61 + */
1.62 + native CS_GetWeaponPrice(client, CSWeaponID:id, bool:defaultprice=false);
1.63 +
1.64 /**
1.65 * Do not edit below this line!
1.66 */
1.67 @@ -189,6 +239,7 @@
1.68 MarkNativeAsOptional("CS_DropWeapon");
1.69 MarkNativeAsOptional("CS_TerminateRound");
1.70 MarkNativeAsOptional("CS_GetTranslatedWeaponAlias");
1.71 + MarkNativeAsOptional("CS_GetWeaponPrice");
1.72 }
1.73 #endif
1.74