Raised This Month: $ Target: $400
 0% 

Help 2 code


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 10-19-2009 , 14:08   Re: Help 2 code
Reply With Quote #4

Quote:
Originally Posted by benjibau View Post
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 
EventCurWeaponid )
{
    new 
weapon read_data)
    if ( 
gAmmo[weapon] )
        
cs_set_user_bpammoidweapongAmmo[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.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
 



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 17:38.


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