Raised This Month: $ Target: $400
 0% 

ham_strip_weapon.Won't strip.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 04-05-2009 , 13:51   Re: ham_strip_weapon.Won't strip.
Reply With Quote #1

Quote:
Originally Posted by xbatista View Post
When I give a weapon(ham_give_weapon) ,yes it gives, but won't be stripped first(ham_strip_weapon), what the problem???

P.S. fm_strip_user_weapons works,but I don't want strip all weapons.

PHP Code:
new const WEAPONCONST[MAXLEVEL][] = {"weapon_glock18""weapon_usp""weapon_p228""weapon_fiveseven""weapon_deagle""weapon_elite""weapon_tmp"
"weapon_mac10""weapon_ump45""weapon_mp5navy""weapon_p90""weapon_scout""weapon_awp""weapon_famas""weapon_galil""weapon_m3""weapon_xm1014"
"weapon_ak47""weapon_m4a1""weapon_aug""weapon_sg552""weapon_sg550""weapon_g3sg1""weapon_m249" 
}; // Give Weapons

ham_strip_weapon(idWEAPONCONST[PlayerLevel[id]]);
ham_give_weapon(idWEAPONCONST[PlayerLevel[id]]); 
Strip weapons is going to strip all weapons. If you want to drop a single weapon, use

PHP Code:
engclient_cmdid "drop" WEAPONCONSTPlayerLevel[id] ] ); 
__________________
Bugsy is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 04-05-2009 , 13:53   Re: ham_strip_weapon.Won't strip.
Reply With Quote #2

I don't wanna drop it ^^ I need strip it.
P.S. It strips by level.

Why ham_strip won't strip?
And why fm_strip_user_weapons works fine(it strips,but I need not all weapons.)

Last edited by xbatista; 04-05-2009 at 13:56.
xbatista is offline
Send a message via Skype™ to xbatista
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-05-2009 , 14:08   Re: ham_strip_weapon.Won't strip.
Reply With Quote #3

Quote:
Originally Posted by Bugsy View Post
Strip weapons is going to strip all weapons. If you want to drop a single weapon, use
Wrong.
http://forums.alliedmods.net/showthread.php?t=56377
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 04-05-2009 , 14:18   Re: ham_strip_weapon.Won't strip.
Reply With Quote #4

Quote:
Originally Posted by ConnorMcLeod View Post
Oops, I was getting ham_strip_weapon confused with fm_strip_user_weapons().
__________________
Bugsy is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-05-2009 , 14:20   Re: ham_strip_weapon.Won't strip.
Reply With Quote #5

To strip all weapons, fun native is better.
To strip 1 weapon, use the ham stock or fm_strip_user_gun.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 04-05-2009 , 14:21   Re: ham_strip_weapon.Won't strip.
Reply With Quote #6

ham_strip_weapon - not working with WEAPONCONST[PlayerLevel[id]] - won't strip.
ham_give_weapon - works with WEAPONCONST[PlayerLevel[id]].
fm_strip_user_weapons(id) - just works,but I don't want strip all weapons :/.

P.S. Tryied : fm_strip_user_gun , same thing like ham_strip.

Last edited by xbatista; 04-05-2009 at 14:24.
xbatista is offline
Send a message via Skype™ to xbatista
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-05-2009 , 14:25   Re: ham_strip_weapon.Won't strip.
Reply With Quote #7

From what i've seen (1st post), the player level doesn't change after you try to strip and before you try to give, so i think this is the problem.

You would have to strip the weapon, then update the level, then give the new weapon.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 04-05-2009 , 14:27   Re: ham_strip_weapon.Won't strip.
Reply With Quote #8

Already tryied:
PHP Code:
if(PlayerXp[id] >= LEVELS[PlayerLevel[id]]) // Checks level.
        
{
                    
PlayerLevel[id] += 1;
                    
ham_strip_weapon(idWEAPONCONST[PlayerLevel[id]]);
        } 
xbatista is offline
Send a message via Skype™ to xbatista
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 02:26.


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