Offline |
|
Csatlakozott: 2012.01.29. 12:48 Hozzászólások: 408
Megköszönt másnak: 15 alkalommal Megköszönték neki: 126 alkalommal
|
Végtelen tár: /* Formatright © 2009, ConnorMcLeod Infinite BpAmmo is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Infinite BpAmmo; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // #define UNLIMITED_NADES #include <amxmodx> #include <fakemeta> #define VERSION "0.0.1" enum { AmmoX_AmmoID = 1, AmmoX_Ammount } enum { ammo_none, ammo_338magnum = 1, // 30 ammo_762nato, // 90 ammo_556natobox, // 200 ammo_556nato, // 90 ammo_buckshot, // 32 ammo_45acp, // 100 ammo_57mm, // 100 ammo_50ae, // 35 ammo_357sig, // 52 ammo_9mm, // 120 ammo_flashbang, // 2 ammo_hegrenade, // 1 ammo_smokegrenade, // 1 ammo_c4 // 1 } new const g_iMaxBpAmmo[] = { 0, 30, 90, 200, 90, 32, 100, 100, 35, 52, 120, 2, 1, 1, 1 } #define XO_PLAYER 5 #define m_rgpPlayerItems_0 376 public plugin_init() { register_plugin("Infinite BpAmmo", VERSION, "ConnorMcLeod") register_message(get_user_msgid("AmmoX"), "Message_AmmoX") } public Message_AmmoX(iMsgId, iMsgDest, id) { new iAmmoID = get_msg_arg_int(AmmoX_AmmoID) if( is_user_alive(id) && iAmmoID ) { new iMaxBpAmmo = g_iMaxBpAmmo[iAmmoID] if( get_msg_arg_int(AmmoX_Ammount) < iMaxBpAmmo ) { #if defined UNLIMITED_NADES if( iAmmoID < ammo_c4 ) #else if( iAmmoID <= ammo_9mm ) #endif { set_msg_arg_int(AmmoX_Ammount, ARG_BYTE, iMaxBpAmmo) set_pdata_int(id, m_rgpPlayerItems_0 + iAmmoID, iMaxBpAmmo, XO_PLAYER) } } } }
Végtelen lőszer: /* Formatright © 2009, ConnorMcLeod Infinite Ammo is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Infinite BpAmmo; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include <amxmodx> #include <fakemeta> #include <hamsandwich> #define VERSION "0.0.1" enum { CurWeapon_IsActive = 1, // byte CurWeapon_WeaponID, // byte CurWeapon_ClipAmmo // byte } #define XO_WEAPON 4 #define m_iClip 51 #define m_iClientClip 52 #define XO_PLAYER 5 #define m_pActiveItem 373 new const g_iMaxClip[CSW_P90+1] = { -1, 13, -1, 10, 1, 7, 1, 30, 30, 1, 30, 20, 25, 30, 35, 25, 12, 20, 10, 30, 100, 8 , 30, 30, 20, 2, 7, 30, 30, -1, 50 } public plugin_init() { register_plugin("Infinite Ammo", VERSION, "ConnorMcLeod") register_message(get_user_msgid("CurWeapon"), "Message_CurWeapon") } public Message_CurWeapon(iMsgId, iMsgDest, id) { if( get_msg_arg_int(CurWeapon_IsActive) ) { new iMaxClip = g_iMaxClip[ get_msg_arg_int( CurWeapon_WeaponID ) ] if( get_msg_arg_int(CurWeapon_ClipAmmo) < iMaxClip ) { new iWeapon = get_pdata_cbase(id, m_pActiveItem, XO_PLAYER) if( iWeapon > 0 ) { set_pdata_int(iWeapon, m_iClip, iMaxClip, XO_WEAPON) set_pdata_int(iWeapon, m_iClientClip, iMaxClip, XO_WEAPON) set_msg_arg_int(CurWeapon_ClipAmmo, ARG_BYTE, iMaxClip) } } } }
Ők köszönték meg HuBaBuBa nek ezt a hozzászólást: PiStA99 (2015.02.26. 18:38) |
|
|