/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #include <cstrike> #define PLUGIN "Unlimited Ammo" #define VERSION "1.0" #define AUTHOR "AlMod" stock Weapons_Ammo[] = { -1, 13, -1, 10, 1, 7, -1, 30, 30, -1, 30, 20, 25, 30, 35, 30, 12, 20, 10, 30, 100, 8, 30, 30, 20, -1, 7, 30, 30, -1, 50 } stock Weapon_Slots[] = { 0, 2, //CSW_P228 0, 1, //CSW_SCOUT 4, //CSW_HEGRENADE 1, //CSW_XM1014 5, //CSW_C4 1, //CSW_MAC10 1, //CSW_AUG 4, //CSW_SMOKEGRENADE 2, //CSW_ELITE 2, //CSW_FIVESEVEN 1, //CSW_UMP45 1, //CSW_SG550 1, //CSW_GALIL 1, //CSW_FAMAS 2, //CSW_USP 2, //CSW_GLOCK18 1, //CSW_AWP 1, //CSW_MP5NAVY 1, //CSW_M249 1, //CSW_M3 1, //CSW_M4A1 1, //CSW_TMP 1, //CSW_G3SG1 4, //CSW_FLASHBANG 2, //CSW_DEAGLE 1, //CSW_SG552 1, //CSW_AK47 3, //CSW_KNIFE 1 //CSW_P90 } public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_event("CurWeapon","On_CurWeapon", "be", "1=1") } public On_CurWeapon(id) { new wp = read_data(2) if (Weapon_Slots[wp] == 1 || Weapon_Slots[wp] == 2) { new ammo = read_data(3) new stuck = Weapons_Ammo[wp] - ammo if (get_user_button(id) & IN_ATTACK) { cs_set_user_bpammo(id, wp, stuck) } } } |