1.1 --- a/plugins/include/cstrike.inc Sun May 27 16:51:29 2012 -0400
1.2 +++ b/plugins/include/cstrike.inc Sat May 26 18:31:23 2012 -0400
1.3 @@ -67,41 +67,63 @@
1.4
1.5 enum CSWeaponID
1.6 {
1.7 - CSWeapon_NONE,
1.8 - CSWeapon_P228,
1.9 - CSWeapon_GLOCK,
1.10 - CSWeapon_SCOUT,
1.11 - CSWeapon_HEGRENADE,
1.12 - CSWeapon_XM1014,
1.13 - CSWeapon_C4,
1.14 - CSWeapon_MAC10,
1.15 - CSWeapon_AUG,
1.16 - CSWeapon_SMOKEGRENADE,
1.17 - CSWeapon_ELITE,
1.18 - CSWeapon_FIVESEVEN,
1.19 - CSWeapon_UMP45,
1.20 - CSWeapon_SG550,
1.21 - CSWeapon_GALIL,
1.22 - CSWeapon_FAMAS,
1.23 - CSWeapon_USP,
1.24 - CSWeapon_AWP,
1.25 - CSWeapon_MP5NAVY,
1.26 - CSWeapon_M249,
1.27 - CSWeapon_M3,
1.28 - CSWeapon_M4A1,
1.29 - CSWeapon_TMP,
1.30 - CSWeapon_G3SG1,
1.31 - CSWeapon_FLASHBANG,
1.32 - CSWeapon_DEAGLE,
1.33 - CSWeapon_SG552,
1.34 - CSWeapon_AK47,
1.35 - CSWeapon_KNIFE,
1.36 - CSWeapon_P90,
1.37 - CSWeapon_SHIELD,
1.38 - CSWeapon_KEVLAR,
1.39 - CSWeapon_ASSAULTSUIT,
1.40 - CSWeapon_NIGHTVISION
1.41 + CSWeapon_NONE = 0,
1.42 + CSWeapon_P228,
1.43 + CSWeapon_GLOCK,
1.44 + CSWeapon_SCOUT,
1.45 + CSWeapon_HEGRENADE,
1.46 + CSWeapon_XM1014,
1.47 + CSWeapon_C4,
1.48 + CSWeapon_MAC10,
1.49 + CSWeapon_AUG,
1.50 + CSWeapon_SMOKEGRENADE,
1.51 + CSWeapon_ELITE,
1.52 + CSWeapon_FIVESEVEN,
1.53 + CSWeapon_UMP45,
1.54 + CSWeapon_SG550,
1.55 + CSWeapon_GALIL,
1.56 + CSWeapon_FAMAS,
1.57 + CSWeapon_USP,
1.58 + CSWeapon_AWP,
1.59 + CSWeapon_MP5NAVY,
1.60 + CSWeapon_M249,
1.61 + CSWeapon_M3,
1.62 + CSWeapon_M4A1,
1.63 + CSWeapon_TMP,
1.64 + CSWeapon_G3SG1,
1.65 + CSWeapon_FLASHBANG,
1.66 + CSWeapon_DEAGLE,
1.67 + CSWeapon_SG552,
1.68 + CSWeapon_AK47,
1.69 + CSWeapon_KNIFE,
1.70 + CSWeapon_P90,
1.71 + CSWeapon_SHIELD,
1.72 + CSWeapon_KEVLAR,
1.73 + CSWeapon_ASSAULTSUIT,
1.74 + CSWeapon_NIGHTVISION,
1.75 + CSWeapon_GALILAR,
1.76 + CSWeapon_BIZON,
1.77 + CSWeapon_MAG7,
1.78 + CSWeapon_NEGEV,
1.79 + CSWeapon_SAWEDOFF,
1.80 + CSWeapon_TEC9,
1.81 + CSWeapon_TASER,
1.82 + CSWeapon_HKP2000,
1.83 + CSWeapon_MP7,
1.84 + CSWeapon_MP9,
1.85 + CSWeapon_NOVA,
1.86 + CSWeapon_P250,
1.87 + CSWeapon_SCAR17,
1.88 + CSWeapon_SCAR20,
1.89 + CSWeapon_SG556,
1.90 + CSWeapon_SSG08,
1.91 + CSWeapon_KNIFE_GG,
1.92 + CSWeapon_MOLOTOV,
1.93 + CSWeapon_DECOY,
1.94 + CSWeapon_INCGRENADE,
1.95 + CSWeapon_DEFUSER
1.96 };
1.97 +
1.98 /**
1.99 * Called when a player attempts to purchase an item.
1.100 * Return Plugin_Continue to allow the purchase or return a
1.101 @@ -224,6 +246,7 @@
1.102 * @return Number of non-null bytes written.
1.103 *
1.104 * @error Invalid client.
1.105 + * @note Only supported on CS:S. Writes 0-length string on CS:GO.
1.106 */
1.107 native CS_GetClientClanTag(client, String:buffer[], size);
1.108
1.109 @@ -234,10 +257,20 @@
1.110 * @noreturn
1.111 *
1.112 * @error Invalid client.
1.113 + * @note Only supported on CS:S. Has no effect on CS:GO.
1.114 */
1.115 native CS_SetClientClanTag(client, const String:tag[]);
1.116
1.117 /**
1.118 + * Gets a weaponID from a alias
1.119 + * @param alias Weapon alias to attempt to get an id for.
1.120 + * @return Returns a weapon id or 0 if failed to find a match.
1.121 + *
1.122 + * @note For best results use CS_GetTranslatedWeaponAlias on the weapon name before passing it.
1.123 + */
1.124 +native CS_AliasToWeaponID(const String:alias[]);
1.125 +
1.126 +/**
1.127 * Do not edit below this line!
1.128 */
1.129 public Extension:__ext_cstrike =
1.130 @@ -263,6 +296,7 @@
1.131 MarkNativeAsOptional("CS_GetWeaponPrice");
1.132 MarkNativeAsOptional("CS_GetClientClanTag");
1.133 MarkNativeAsOptional("CS_SetClientClanTag");
1.134 + MakrNativeAsOptional("CS_AliasToWeaponID");
1.135 }
1.136 #endif
1.137