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

Remove a weapon [CSGO]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mathias.
Veteran Member
Join Date: Aug 2010
Location: Canada is my city
Old 08-04-2014 , 21:54   Remove a weapon [CSGO]
Reply With Quote #1

How to completely remove a weapon from a player?

RemovePlayerItem(player, weapon); <-- dont work (weird stuff)
RemoveEdict(weapon); <-- crash the server
Mathias. is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 08-04-2014 , 22:20   Re: Remove a weapon [CSGO]
Reply With Quote #2

Look at SMLib, and how they strip players.
Mitchell is offline
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 08-05-2014 , 09:34   Re: Remove a weapon [CSGO]
Reply With Quote #3

You cant do RemoveEdict on the weapon unless its dropped and you wait one frame. AcceptEntityInput(ent, "Kill") however works fine.
Dr!fter is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 08-05-2014 , 11:50   Re: Remove a weapon [CSGO]
Reply With Quote #4

Quote:
Originally Posted by Dr!fter View Post
You cant do RemoveEdict on the weapon unless its dropped and you wait one frame. AcceptEntityInput(ent, "Kill") however works fine.
Also, after killing the weapon you'll want to change their "ActiveWeapon" to another gun
Mitchell is offline
Mathias.
Veteran Member
Join Date: Aug 2010
Location: Canada is my city
Old 08-05-2014 , 19:09   Re: Remove a weapon [CSGO]
Reply With Quote #5

alrite thanks, will try that

EDIT:
Does AcceptEntityInput(ent, "Kill") clear the edict?

Last edited by Mathias.; 08-05-2014 at 19:35.
Mathias. is offline
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 08-05-2014 , 19:31   Re: Remove a weapon [CSGO]
Reply With Quote #6

Quote:
Originally Posted by Mitchell View Post
Also, after killing the weapon you'll want to change their "ActiveWeapon" to another gun
I assumed he was dropping it first (from another post made somewhere)
Dr!fter is offline
ZombieWarrior
Member
Join Date: Mar 2014
Old 08-05-2014 , 19:34   Re: Remove a weapon [CSGO]
Reply With Quote #7

There is a plugin for this, work with CSS and CSGO I think

https://forums.alliedmods.net/showthread.php?p=1762508
ZombieWarrior 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 06:31.


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