Raised This Month: $ Target: $400
 0% 

remove weapon from players !


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
abdobiskra
Veteran Member
Join Date: Jul 2014
Location: Algeria
Old 12-24-2015 , 09:38   remove weapon from players !
Reply With Quote #1

Hi !
How is the removal of weapons from the players?
__________________
abdobiskra is offline
Send a message via Skype™ to abdobiskra
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 12-24-2015 , 09:51   Re: remove weapon from players !
Reply With Quote #2

strip_user_weapons() function in fun module. This removes all player weapons.
http://www.amxmodx.org/api/fun/strip_user_weapons

There is also fm_strip_user_gun() in fakemeta_util.
http://www.amxmodx.org/api/fakemeta_...strip_user_gun
__________________
Bugsy is offline
abdobiskra
Veteran Member
Join Date: Jul 2014
Location: Algeria
Old 12-24-2015 , 10:10   Re: remove weapon from players !
Reply With Quote #3

Bugsy
Thx !

what about ham_strip_weapon !
__________________

Last edited by abdobiskra; 12-24-2015 at 10:15.
abdobiskra is offline
Send a message via Skype™ to abdobiskra
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 12-24-2015 , 11:08   Re: remove weapon from players !
Reply With Quote #4

There are multiple options for doing this. Do you want to strip every weapon or only a specific weapon? Do you want these weapon(s) only dropped, or totally removed from the game?
__________________
Bugsy is offline
abdobiskra
Veteran Member
Join Date: Jul 2014
Location: Algeria
Old 12-25-2015 , 04:36   Re: remove weapon from players !
Reply With Quote #5

If i wanted to make my special particular weapon?
How can I prevent it on the players?

Code:
new pistols public plugin_init( ) {     register_concmd("weapon_egon", "remove_item", ADMIN_BAN);     pistols = HLW_EGON } public remove_item( id, level, cid ) {     if( !cmd_access( id, level, cid, 0 ) )         return PLUGIN_HANDLED;         new players[32]     new num, i     get_players(players, num, "bch")     for (i = 0; i < num; i++)     {     fm_strip_user_gun(players[i], pistols)     }     return PLUGIN_CONTINUE }
__________________
abdobiskra is offline
Send a message via Skype™ to abdobiskra
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 12-25-2015 , 11:03   Re: remove weapon from players !
Reply With Quote #6

I'm not sure what you mean. Is this a custom weapon that you made? If you need to remove an item from a particular slot, take a look here: https://forums.alliedmods.net/showpo...6&postcount=77
__________________

Last edited by Bugsy; 12-25-2015 at 11:18.
Bugsy is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 12-26-2015 , 00:33   Re: remove weapon from players !
Reply With Quote #7

I use below method:

https://forums.alliedmods.net/showthread.php?t=56377
zmd94 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 18:15.


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