Raised This Month: $32 Target: $400
 8% 

Hidenseek by Exolent cs_set_weapon_ammo


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
TandborsteN
Member
Join Date: Sep 2008
Old 02-18-2012 , 07:51   Hidenseek by Exolent cs_set_weapon_ammo
Reply With Quote #1

Hi!
In exolents hidenseek plugin, cstrike isnt included, but he still got cs_set_user_bpammo function.
PHP Code:
#define cs_set_user_bpammo(%1,%2,%3) set_pdata_int(%1, __get_ammo_offset(%2), %3)

.......

__get_ammo_offset(weapon)
{
    static 
offset;
    
    switch( 
weapon )
    {
        case 
CSW_AWP:
        {
            
offset OFFSET_AWP_AMMO;
        }
        case 
CSW_SCOUTCSW_AK47CSW_G3SG1:
        {
            
offset OFFSET_SCOUT_AMMO;
        }
        case 
CSW_FAMASCSW_M4A1CSW_AUGCSW_SG550CSW_GALILCSW_SG552:
        {
            
offset OFFSET_FAMAS_AMMO;
        }
        case 
CSW_M3CSW_XM1014:
        {
            
offset OFFSET_M3_AMMO;
        }
        case 
CSW_USPCSW_UMP45CSW_MAC10:
        {
            
offset OFFSET_USP_AMMO;
        }
        case 
CSW_FIVESEVENCSW_P90:
        {
            
offset OFFSET_FIVESEVEN_AMMO;
        }
        case 
CSW_DEAGLE:
        {
            
offset OFFSET_DEAGLE_AMMO;
        }
        case 
CSW_P228:
        {
            
offset OFFSET_P228_AMMO;
        }
        case 
CSW_GLOCK18CSW_MP5NAVYCSW_TMPCSW_ELITE:
        {
            
offset OFFSET_GLOCK_AMMO;
        }
        case 
CSW_FLASHBANG:
        {
            
offset OFFSET_FLASHBANG_AMMO;
        }
        case 
CSW_HEGRENADE:
        {
            
offset OFFSET_HEGRENADE_AMMO;
        }
        case 
CSW_SMOKEGRENADE:
        {
            
offset OFFSET_SMOKEGRENADE_AMMO;
        }
        case 
CSW_C4:
        {
            
offset OFFSET_C4_AMMO;
        }
        default:
        {
            return 
0;
        }
    }
    
    return 
offset;

i want the function cs_set_weapon_ammo from the cstrike include in the same way as cs_set_user_bpammo, without including cstrike.inc. Is it possible, and if it is, how?

Thanks//
TandborsteN
__________________
TANDBORSTEN!
TandborsteN is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 02-18-2012 , 19:50   Re: Hidenseek by Exolent cs_set_weapon_ammo
Reply With Quote #2

#define cs_set_user_bpammo(%1,%2,%3) set_pdata_int(%1, __get_ammo_offset(%2), %3)

Dunno what it means but says enough imo.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
TandborsteN
Member
Join Date: Sep 2008
Old 02-19-2012 , 04:46   Re: Hidenseek by Exolent cs_set_weapon_ammo
Reply With Quote #3

I can't find any way to get it to work. cs_set_user_bpammo and cs_set_weapon_ammo doesen't work the same way.
Example:
PHP Code:
cs_set_user_bpammo(idCSW_AK47120);

...

cs_set_weapon_ammo(find_ent_by_owner(-1"weapon_ak47"id), 50); 
__________________
TANDBORSTEN!

Last edited by TandborsteN; 02-19-2012 at 04:46.
TandborsteN is offline
Erox902
Veteran Member
Join Date: Jun 2009
Location: Never Never Land
Old 02-19-2012 , 08:39   Re: Hidenseek by Exolent cs_set_weapon_ammo
Reply With Quote #4

Why don't you just include cstrike? It's better to use cstrike anyway.
Erox902 is offline
TandborsteN
Member
Join Date: Sep 2008
Old 02-19-2012 , 10:48   Re: Hidenseek by Exolent cs_set_weapon_ammo
Reply With Quote #5

Because i want to add cs_set_weapon_ammo into hidenseek.sma, and if i incude cstrike, its ALOT of stuffs to fix, since exolent added alot of the cstrike functions into it.
__________________
TANDBORSTEN!
TandborsteN is offline
Erox902
Veteran Member
Join Date: Jun 2009
Location: Never Never Land
Old 02-19-2012 , 17:25   Re: Hidenseek by Exolent cs_set_weapon_ammo
Reply With Quote #6

Ok sry can't give you any help then.
However I still suggest that you change it all to cstrike.
Erox902 is offline
Reply



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 14:26.


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