AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Attach dead player's weapons to you (https://forums.alliedmods.net/showthread.php?t=307995)

sekac 06-03-2018 04:22

Attach dead player's weapons to you
 
So I need to attach all weapons of a dead player to someone alive. Like when someone dies I can just call a command and get that person's weapons.

HamletEagle 06-03-2018 05:04

Re: Attach dead player's weapons to you
 
Execute touch between the weaponboxes and the player.

sekac 06-03-2018 05:08

Re: Attach dead player's weapons to you
 
Yeah I know that much, but I failed at getting the weaponbox id of the dead player.

HamletEagle 06-03-2018 05:15

Re: Attach dead player's weapons to you
 
If you want to give the weapons right when the player died you can simply hook Ham_Killed as pre, get all player weapons with get_user_weapons and use give_item on another player.
If you want to give the weapons after they were dropped you need to do what I said in my previous post.

So, what are you trying to do?

sekac 06-03-2018 05:33

Re: Attach dead player's weapons to you
 
I need to give the weapons after they are dropped. I just need to know how to get that weaponbox that's on the ground by a specific player so I can use fake_touch.

HamletEagle 06-03-2018 07:22

Re: Attach dead player's weapons to you
 
Try with FM_SetModel.


All times are GMT -4. The time now is 04:41.

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