AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   remove weapon from players ! (https://forums.alliedmods.net/showthread.php?t=276612)

abdobiskra 12-24-2015 09:38

remove weapon from players !
 
Hi !
How is the removal of weapons from the players?

Bugsy 12-24-2015 09:51

Re: remove weapon from players !
 
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

abdobiskra 12-24-2015 10:10

Re: remove weapon from players !
 
Bugsy
Thx !

what about ham_strip_weapon !

Bugsy 12-24-2015 11:08

Re: remove weapon from players !
 
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?

abdobiskra 12-25-2015 04:36

Re: remove weapon from players !
 
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 }

Bugsy 12-25-2015 11:03

Re: remove weapon from players !
 
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

zmd94 12-26-2015 00:33

Re: remove weapon from players !
 
I use below method:

https://forums.alliedmods.net/showthread.php?t=56377


All times are GMT -4. The time now is 18:15.

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