Raised This Month: $51 Target: $400
 12% 

[REQ] first spawn / buy weapons with full bpammo


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
foxxx
Junior Member
Join Date: Dec 2009
Old 10-20-2010 , 08:23   [REQ] first spawn / buy weapons with full bpammo
Reply With Quote #1

If the player is first spawn or buy weapons, then give full bpammo...
(just give full bpammo when first spawn with a pistol or buy a weapon...)


--------------------
Sorry for my english.

Last edited by foxxx; 10-21-2010 at 02:13.
foxxx is offline
naven
Veteran Member
Join Date: Jun 2008
Location: Poland, Cieszyn
Old 10-20-2010 , 15:34   Re: [REQ] first spawn / buy weapons with full ammo
Reply With Quote #2

Really hard to understand.

When player spawns first time you want give him full default pistol ammo?
__________________
naven.com.pl
"At the end of the day, there are always going to be mental disorders and people who cause violence for no other reason than the fact that they're fucked up and lost. And all we can do is try to learn from it." Corey Taylor.
naven is offline
blanko
Senior Member
Join Date: Aug 2008
Old 10-20-2010 , 16:16   Re: [REQ] first spawn / buy weapons with full ammo
Reply With Quote #3

Try the "free ammo" or "free weapons" plugin, something like that. On the approved board.
blanko is offline
foxxx
Junior Member
Join Date: Dec 2009
Old 10-21-2010 , 02:19   Re: [REQ] first spawn / buy weapons with full bpammo
Reply With Quote #4

Sorry. I mean bpammo...
In CS1.6 guns without bpammo when players buy guns, I want a plugin that gives player full bpammo when they're buying...
foxxx is offline
Welgericht
Member
Join Date: Jul 2010
Old 10-21-2010 , 07:42   Re: [REQ] first spawn / buy weapons with full bpammo
Reply With Quote #5

PHP Code:

#include < amxmodx>
#include < cstrike >
#include < hamsandwich >

public plugin_init()
{
RegisterHamHam_Spawn"player""fwdPlayerSpawn");
}

fwdPlayerSpawn(id)
{
        
cs_set_user_bpammo(idCSW_USP100
               
cs_set_user_bpammo(idCSW_ELITE120
            
cs_set_user_bpammo(idCSW_DEAGLE35
            
cs_set_user_bpammo(idCSW_GLOCK18120
            
cs_set_user_bpammo(idCSW_P22852
            
cs_set_user_bpammo(idCSW_FIVESEVEN100
            
cs_set_user_bpammo(idCSW_XM101432
            
cs_set_user_bpammo(idCSW_M332
            
cs_set_user_bpammo(idCSW_P90100
            
cs_set_user_bpammo(idCSW_MAC10100
            
cs_set_user_bpammo(idCSW_MP5NAVY120
            
cs_set_user_bpammo(idCSW_TMP120
            
cs_set_user_bpammo(idCSW_UMP45100
            
cs_set_user_bpammo(idCSW_FAMAS90
            
cs_set_user_bpammo(idCSW_GALIL90
            
cs_set_user_bpammo(idCSW_SCOUT90
            
cs_set_user_bpammo(idCSW_AUG90
            
cs_set_user_bpammo(idCSW_M4A190
            
cs_set_user_bpammo(idCSW_AK4790
            
cs_set_user_bpammo(idCSW_SG55290
            
cs_set_user_bpammo(idCSW_G3SG190
            
cs_set_user_bpammo(idCSW_SG55290
            
cs_set_user_bpammo(idCSW_AWP30
            
cs_set_user_bpammo(idCSW_M249200

Welgericht is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-21-2010 , 14:59   Re: [REQ] first spawn / buy weapons with full bpammo
Reply With Quote #6

PHP Code:
/*    Formatright © 2010, ConnorMcLeod

    Full BpAmmo On Spawn 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 Full BpAmmo On Spawn; 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"

#define ammo_338magnum 1
#define ammo_9mm 10

#define XTRA_OFS_PLAYER    5
#define m_rgAmmo_Slot0    376

new const g_iMaxBpAmmo[] = {
    
0,
    
30,
    
90,
    
200,
    
90,
    
32,
    
100,
    
100,
    
35,
    
52,
    
120
}

public 
plugin_init()
{
    
register_plugin("Full BpAmmo On Spawn"VERSION"ConnorMcLeod")

    
RegisterHam(Ham_Spawn"player""Ham_CBasePlayer_Spawn_Post"1)
}

public 
Ham_CBasePlayer_Spawn_Postid )
{
    if( 
is_user_alive(id) )
    {
        for(new 
iAmmoIndex=ammo_338magnumiAmmoIndex<=ammo_9mmiAmmoIndex++)
        {
            
set_pdata_int(idm_rgAmmo_Slot0 iAmmoIndexg_iMaxBpAmmo[iAmmoIndex], XTRA_OFS_PLAYER)
        }
    }

__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
foxxx
Junior Member
Join Date: Dec 2009
Old 10-24-2010 , 11:05   Re: [REQ] first spawn / buy weapons with full bpammo
Reply With Quote #7

Very Thanks you!
foxxx is offline
JohnRambo
Junior Member
Join Date: Jan 2014
Old 02-01-2014 , 03:36   Re: [REQ] first spawn / buy weapons with full bpammo
Reply With Quote #8

ConnorMcLeod, thank you! But is it possible to modify this plugin so it will give full bpammo ONLY when the player buys a new weapon. As implemented in the CS Sourse. Not each time he spawns!
JohnRambo is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 02-01-2014 , 06:19   Re: [REQ] first spawn / buy weapons with full bpammo
Reply With Quote #9

Quote:
Originally Posted by JohnRambo View Post
ConnorMcLeod, thank you! But is it possible to modify this plugin so it will give full bpammo ONLY when the player buys a new weapon. As implemented in the CS Sourse. Not each time he spawns!
try this... small edit.

Code:
/*    Formatright © 2010, ConnorMcLeod     Full BpAmmo On Spawn 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 Full BpAmmo On Spawn; 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" #define ammo_338magnum 1 #define ammo_9mm 10 #define XTRA_OFS_PLAYER    5 #define m_rgAmmo_Slot0    376 #define BitSet(%1)              ( BitFirstSpawn |= ( 1 << ( %1 & 31 ) ) ) #define BitClear(%1)            ( BitFirstSpawn &= ~( 1 << ( %1 & 31 ) ) ) #define BitCheck(%1)            ( BitFirstSpawn & ( 1 << ( %1 & 31 ) ) ) new BitFirstSpawn new const g_iMaxBpAmmo[] = {     0,     30,     90,     200,     90,     32,     100,     100,     35,     52,     120 } public plugin_init() {     register_plugin("Full BpAmmo On Spawn", VERSION, "ConnorMcLeod")         RegisterHam(Ham_Spawn, "player", "Ham_CBasePlayer_Spawn_Post", 1) } public client_putinserver( id ) {     BitClear( id ) } public Ham_CBasePlayer_Spawn_Post( id ) {     if( !BitCheck( id ) && is_user_alive( id ) )     {         for(new iAmmoIndex=ammo_338magnum; iAmmoIndex<=ammo_9mm; iAmmoIndex++)         {             set_pdata_int(id, m_rgAmmo_Slot0 + iAmmoIndex, g_iMaxBpAmmo[iAmmoIndex], XTRA_OFS_PLAYER)             BitSet( id )         }     } }
__________________

Last edited by Blizzard_87; 02-01-2014 at 06:20.
Blizzard_87 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 02-01-2014 , 06:23   Re: [REQ] first spawn / buy weapons with full bpammo
Reply With Quote #10

You made a modification without reading the request...
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:05.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode