AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [STOCK] strip_user_gun (https://forums.alliedmods.net/showthread.php?t=26300)

VEN 03-30-2006 10:33

[STOCK] strip_user_gun
 
I made that stock a while ago and never posted it's code.
But since people on this forum asked and continue asking for the code with similar functionality i decided to post that function.

EDIT

Uses fakemeta module and better technique now. See fm_strip_user_gun from the Fakemeta Utilities.

Paddl 03-30-2006 10:34

That should be usefull for some people, for an friend of mine it probarly will. :P

v3x 03-30-2006 10:37

Interesting.

VEN 03-30-2006 13:00

I also can post a strip_user_nongun stock for (non-gun weapons and items except knife).
It's not hard either but i don't know if i will do that.

p3tsin 04-04-2006 04:43

:o
really nice job, never came up to my mind..
up to this point ive always used a timer to remove the weapon after making the player drop it (sucks bad) :?
ty <3

VEN 04-05-2006 03:01

And probably you removed only weaponbox entity or only weapon_* entity? Well, i'd say this isn't a good idea - such methods may crash the server. This is the most common mistake when dealing with weapon removal. While weapon "outside a player" it's consist's from weaponbox entity (visible "box") and weapon_* entity wich linked to that box. Both should be removed and better in the appropriate sequence, i.e. weaponbox, weapon_* entity.

p3tsin 04-05-2006 05:10

yeah, i only removed the weaponbox.. though it never crashed my server
i was wondering earlier what the owner thingy was but forgot to ask, now i know :P


All times are GMT -4. The time now is 16:36.

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