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

Unlimited Reloads (For paintball)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MercedeSx7
Senior Member
Join Date: Feb 2012
Location: Serbia
Old 01-17-2013 , 11:13   Unlimited Reloads (For paintball)
Reply With Quote #1

Hi guys i have problem with ham reload..

PHP Code:
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>
#include <fakemeta>

new const PLUGIN[] = "Unlimited Reloads (For paintball)";
new const 
VERSION[] = "1.0";
new const 
AUTHOR[] = "MercedeS";

public 
plugin_init()
{
register_plugin(PLUGINVERSIONAUTHOR);

RegisterHam(Ham_Weapon_Reload"paintball_reload");
}

public 
paintball_reload(weapon_entity)
{
new 
id pev(weapon_entitypev_owner);
new 
weapon get_user_weapon(id);

switch(
weapon)
{
case 
CSW_MP5NAVY:
{
cs_set_user_bpammo(idCSW_MP5NAVY120);
}
case 
CSW_GLOCK18:
{
cs_set_user_bpammo(idCSW_GLOCK18120);
}
case 
CSW_USP
{
cs_set_user_bpammo(idCSW_USP100);
}
}

CAn someone try too fix?
__________________

Last edited by YamiKaitou; 01-18-2013 at 01:14.
MercedeSx7 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-17-2013 , 12:17   Re: Unlimited Reloads (For paintball)
Reply With Quote #2

Use this :

PHP Code:
#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            // mac10 ump45 usp 
    
ammo_57mm// 100
    
ammo_50ae// 35
    
ammo_357sig// 52
    
ammo_9mm// 120            // elite glock18 mp5navy tmp
    
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
}

new const 
m_rgpPlayerItems[32] = {376,377,...}

const 
INFINITE_RELOAD_BITSUM 1<<ammo_9mm 1<<ammo_45acp

public plugin_init()
{
    
register_plugin("Paintball Infinite BpAmmo"VERSION"ConnorMcLeod")
    
register_message(get_user_msgid("AmmoX"), "Message_AmmoX")
}

public 
Message_AmmoX(iMsgIdiMsgDestid)
{
    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 && INFINITE_RELOAD_BITSUM && 1<<iAmmoID )
        {
            
set_msg_arg_int(AmmoX_AmmountARG_BYTEiMaxBpAmmo)
            
set_pdata_int(idm_rgpPlayerItems[iAmmoIDiMaxBpAmmoXO_PLAYER)
        }
    }

__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 01-18-2013 , 01:14   Re: Unlimited Reloads (For paintball)
Reply With Quote #3

Don't blank out your posts
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou 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 18:33.


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