Quote:
Originally Posted by benjibau
Sorry but i don't need infinit round but ammunitions infinity with reload.
And it's for add in my code at first post
sorry for my bad english
|
I'm not going to combine this into your plugin for you because I can't read half of it. If you clean it up and try to add this, I'll take a look at it.
Untested, seems to compile:
PHP Code:
#include <amxmodx>
#include <cstrike>
#define MAX_WEAPONS 33
new const gAmmo[MAX_WEAPONS] =
{
0,
52,
0,
90,
0,
32,
0,
100,
90,
0,
120,
100,
100,
90,
90,
90,
100,
120,
30,
120,
200,
32,
90,
120,
90,
0,
35,
90,
90,
0,
100,
0,
0
}
public plugin_init()
register_plugin( "Infinite Ammo", "1.0", "Hawk552" )
public plugin_cfg()
register_event( "CurWeapon", "EventCurWeapon", "be" )
public EventCurWeapon( id )
{
new weapon = read_data( 2 )
if ( gAmmo[weapon] )
cs_set_user_bpammo( id, weapon, gAmmo[weapon] )
}
You could also hook Ham_Weapon_Reload, but I can see potential problems with that, such as a possible situation where a player has no backpack ammo and thus cannot reload to trigger getting more.
__________________