View Single Post
ALPHATRAX
Junior Member
Join Date: May 2016
Old 11-06-2017 , 22:28   Re: New-Era's Unlimited Ammo v1.0.1 Updated !
Reply With Quote #38

Quote:
Originally Posted by crazyeffect View Post
Here's connor's version wich does compiles ;P

He just forgot a ')' at the end of a define.

Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>

#define NO_BULLET_WEAPONS_BITSUM ((1<<CSW_C4)|(1<<CSW_KNIFE)|(1<<CSW_HEGRENADE)|(1<<CSW_SMOKEGRENADE)|(1<<CSW_FLASHBANG))

new cvar_enable

public plugin_init() {
    register_plugin("New-Era_UnlimitedAmmo", "1.0.1", "New-Era Scripting Team")

    cvar_enable= register_cvar("ne_uammo_enable", "1")

    register_event("CurWeapon", "event_curweapon", "be", "1=1")
}

public event_curweapon(id) {
    if(!get_pcvar_num(cvar_enable))
        return
    
    new weaponID=read_data(2)
    
    if( !(NO_BULLET_WEAPONS_BITSUM & (1<<weaponID)) ) {
        cs_set_user_bpammo(id, weaponID, 255)
    }
}
BTW: Connor, i think you should post this plugin (above) in 'New Plugin Submissions', since the author is banned & you fixed it

Works like a charm thnx bro
ALPHATRAX is offline