View Single Post
crazyeffect
Veteran Member
Join Date: Jul 2008
Location: Belgium
Old 01-03-2010 , 08:17   Re: New-Era's Unlimited Ammo v1.0.1 Updated !
Reply With Quote #34

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
__________________

Last edited by crazyeffect; 01-03-2010 at 08:21.
crazyeffect is offline
Send a message via MSN to crazyeffect