Raised This Month: $ Target: $400
 0% 

Give full amo


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bazhenov93
Veteran Member
Join Date: Oct 2010
Old 04-20-2012 , 23:46   Give full amo
Reply With Quote #1

PHP Code:
if(is_user_alive(id))
            {
                for(new 
08i++)
                    if( !
user_has_weapon(idother_weapons[i]) )
                    {
                        new 
item;
                        
item give_item(idother_weapons_name[i] )
                        
cs_set_weapon_ammo(item0)
                        
                        if((
get_user_flags(id) & VIP ))
                        { 
                        
cs_set_weapon_ammo(item150)
                        }
                    } 
How to fill secondary ammo?

Last edited by bazhenov93; 04-20-2012 at 23:59.
bazhenov93 is offline
Bilal Pro
Senior Member
Join Date: Mar 2012
Location: Holland
Old 04-21-2012 , 09:52   Re: Give full amo
Reply With Quote #2

PHP Code:
cs_set_user_bpammo(idCSW_WEAPONNAMEAMMO
__________________
  • Point System with rank titles for sale [X] [100% private]
  • VIP Menu for sale [X] [100% private]
  • HnS shop more features for sale [X] [100% private]
Contact: Bilalzaandam1234, on steam if you are interested.
Bilal Pro is offline
bazhenov93
Veteran Member
Join Date: Oct 2010
Old 04-22-2012 , 08:43   Re: Give full amo
Reply With Quote #3

Well, is working for CSW, but I need something like this

PHP Code:
cs_set_weapon_ammo(item100)
cs_set_user_bpammo(itemother_weapons_name[i], 20
Because this way is long:
PHP Code:
cs_set_user_bpammo(idCSW_SCOUT20)
cs_set_user_bpammo(idCSW_P9020)
cs_set_user_bpammo(idCSW_FAMAS20)
cs_set_user_bpammo(idCSW_SG55220)
cs_set_user_bpammo(idCSW_M4A120)
cs_set_user_bpammo(idCSW_M24920)
cs_set_user_bpammo(idCSW_AWP20)
cs_set_user_bpammo(idCSW_AK4720
bazhenov93 is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 04-22-2012 , 08:54   Re: Give full amo
Reply With Quote #4

PHP Code:
const BAD_WEAPONS = ( << CSW_KNIFE ) | ( << CSW_C4 ) | ( << CSW_HEGRENADE ) | ( << CSW_FLASHBANG ) | ( << CSW_SMOKEGRENADE );

static 
iWeapons32 ], iNumiiNum 0;
get_weaponsiPlayeriWeaponsiNum );
for( 
0iNumi++ )
{
  if( !( ( 
<< iWeapons] ) & BAD_WEAPONS ) )
    
cs_set_user_bpammoiPlayeriWeapons], 9999 );

__________________

Last edited by claudiuhks; 04-22-2012 at 08:55.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
Old 04-22-2012, 09:35
BadJoke
This message has been deleted by asherkin. Reason: Spam.
Bilal Pro
Senior Member
Join Date: Mar 2012
Location: Holland
Old 04-22-2012 , 09:40   Re: Give full amo
Reply With Quote #5

Quote:
Originally Posted by BadJoke View Post
dami add pe mes fratica

Stop talking another language in every topic ur talking on please
__________________
  • Point System with rank titles for sale [X] [100% private]
  • VIP Menu for sale [X] [100% private]
  • HnS shop more features for sale [X] [100% private]
Contact: Bilalzaandam1234, on steam if you are interested.
Bilal Pro is offline
bazhenov93
Veteran Member
Join Date: Oct 2010
Old 04-22-2012 , 09:40   Re: Give full amo
Reply With Quote #6

Stop spamming and english only.
bazhenov93 is offline
rak
Veteran Member
Join Date: Oct 2011
Location: banned country
Old 04-25-2012 , 02:40   Re: Give full amo
Reply With Quote #7

it's solved? if not.. show me other_weapons_name[]
__________________

www.amxmodx-es.com

Steam: Luchokoldo

Last edited by rak; 04-25-2012 at 02:40.
rak is offline
Send a message via MSN to rak Send a message via Skype™ to rak
bazhenov93
Veteran Member
Join Date: Oct 2010
Old 04-25-2012 , 13:35   Re: Give full amo
Reply With Quote #8

PHP Code:
new const other_weapons[8] = 
{
    
CSW_SCOUTCSW_P90CSW_FAMASCSW_SG552,
    
CSW_M4A1CSW_M249CSW_AK47CSW_AWP
}

new const 
other_weapons_name[8][] = 
{
    
"weapon_scout""weapon_p90""weapon_famas""weapon_sg552",
    
"weapon_m4a1""weapon_m249""weapon_ak47""weapon_awp"

bazhenov93 is offline
rak
Veteran Member
Join Date: Oct 2011
Location: banned country
Old 04-25-2012 , 15:41   Re: Give full amo
Reply With Quote #9

Quote:
Originally Posted by bazhenov93 View Post
PHP Code:
new const other_weapons[8] = 
{
    
CSW_SCOUTCSW_P90CSW_FAMASCSW_SG552,
    
CSW_M4A1CSW_M249CSW_AK47CSW_AWP
}

new const 
other_weapons_name[8][] = 
{
    
"weapon_scout""weapon_p90""weapon_famas""weapon_sg552",
    
"weapon_m4a1""weapon_m249""weapon_ak47""weapon_awp"

i like it more

PHP Code:
enum _:WeaponData {
    
WPN_NAME[32],
    
WPN_CONST
}

new const 
other_weapons_name[][WeaponData] = {
    { 
"weapon_scout"CSW_SCOUT }, 
    { 
"weapon_p90"CSW_P90 }, 
    { 
"weapon_famas"CSW_FAMAS },
    { 
"weapon_sg552"CSW_SG552 },
    { 
"weapon_m4a1"CSW_M4A1 }, 
    { 
"weapon_m249"CSW_M249 }, 
    { 
"weapon_ak47"CSW_AK47 },
    { 
"weapon_awp"CSW_AWP }

example to use

PHP Code:
#include <amxmodx>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "[R]ak"

enum _:WeaponData {
    
WPN_NAME[32],
    
WPN_CONST
}

new const 
other_weapons_name[][WeaponData] = {
    { 
"weapon_scout"CSW_SCOUT }, 
    { 
"weapon_p90"CSW_P90 }, 
    { 
"weapon_famas"CSW_FAMAS },
    { 
"weapon_sg552"CSW_SG552 },
    { 
"weapon_m4a1"CSW_M4A1 }, 
    { 
"weapon_m249"CSW_M249 }, 
    { 
"weapon_ak47"CSW_AK47 },
    { 
"weapon_awp"CSW_AWP }
}

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    for(new 
sizeof other_weapons_namei++)
        
console_print(0"WPN Name: %s WPN Const: %d"other_weapons_name[i][WPN_NAME], other_weapons_name[i][WPN_CONST])

__________________

www.amxmodx-es.com

Steam: Luchokoldo
rak is offline
Send a message via MSN to rak Send a message via Skype™ to rak
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 04-25-2012 , 15:58   Re: Give full amo
Reply With Quote #10

Just use the native that gets the weapon name to csw

no need to create more work for your self in creating an array like that.
Doc-Holiday is offline
Reply


Thread Tools
Display Modes

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


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