Raised This Month: $ Target: $400
 0% 

Change armoury_entity bpammo


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
andregb8
Junior Member
Join Date: Jul 2009
Old 08-08-2010 , 22:56   Change armoury_entity bpammo
Reply With Quote #1

How can I change armoury_entities bpammo when they spawn? I want that all armoury_entities spawn with their max bpammo. Sorry for my english...

I tried:

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

new const g_iMaxBpAmmo[ ] =
{
    
0309020090,
    
321001003552,
    
1202111
}

const 
m_iPrimaryAmmoType 49
const m_iDefaultAmmo 56

new g_iFwdPrecacheSpawn;

public 
plugin_precache( )
{
    
g_iFwdPrecacheSpawn register_forwardFM_Spawn"FwdPrecacheSpawn");
}

public 
plugin_init( )
{
    
register_plugin"armoury_entity max bpammo""1.0""!-Radio-man" );
    
unregister_forwardFM_Spawng_iFwdPrecacheSpawn);
}

public 
FwdPrecacheSpawniEnt )
{
    if( !
pev_validiEnt ) )
    {
        return 
FMRES_IGNORED;
    }
   
    static 
szClass15 ];
    
peviEntpev_classnameszClass14 );
   
    if( !
equalszClass"armoury_entity" ) )
    {
        return 
FMRES_IGNORED;
    }
   
    
set_pdata_intiEntm_iDefaultAmmog_iMaxBpAmmoget_pdata_intiEntm_iPrimaryAmmoType) ], );
    return 
FMRES_IGNORED;

andregb8 is offline
 



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 00:07.


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