Raised This Month: $ Target: $400
 0% 

[REQ] Full bpammo ONLY when buying new weapon!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
JohnRambo
Junior Member
Join Date: Jan 2014
Old 01-11-2014 , 04:53   [REQ] Full bpammo ONLY when buying new weapon!
Reply With Quote #1

Greetings, dear community. Can somebody help me? I need a plugin, that gives full bpammo ONLY when the player buys a new weapon. As implemented in the CS Sourse. Not each time he spawns!
JohnRambo is offline
JohnRambo
Junior Member
Join Date: Jan 2014
Old 01-11-2014 , 04:56   Re: [REQ] Full bpammo ONLY when buying new weapon!
Reply With Quote #2

Quote:
Originally Posted by ConnorMcLeod View Post
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)
        }
    }

Here is ConnorMcLeod's great plugin for exapmle, but it gives full bpammo every round.
JohnRambo is offline
ANTICHRISTUS
kingdom of weird stuff
Join Date: Jun 2010
Location: My kingdom is not in thi
Old 01-11-2014 , 05:03   Re: [REQ] Full bpammo ONLY when buying new weapon!
Reply With Quote #3

logically, to ask in the correct thread is better. ask in Connor's one and maybe you'll get help.
__________________
ANTICHRISTUS is offline
JohnRambo
Junior Member
Join Date: Jan 2014
Old 01-11-2014 , 06:31   Re: [REQ] Full bpammo ONLY when buying new weapon!
Reply With Quote #4

Here is the original thread. I did not want to unbury it because, it's another regular plugin request thread. Anyway, sorry if did something wrong.
JohnRambo 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 08:48.


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