Garry's Mod

Garry's Mod

[TTT] Weapon Quick-Swap
10 kommentarer
ValsdalV  [ophavsmand] 23. juli kl. 6:17 
@SvveetMavis

It's been a few years since I touched this addon's code and so I may be wrong, but from what I remember the reason I disallowed swapping between the same weapon type (I assume you mean an M16 with another M16, for example) is that the game doesn't let you carry two identical guns at the same time, not even for the single instant this addon needs.

This will probably require a non-trivial addon rework, but I'm not opposed to that. If I ever update this, it will be to add what you ask
SvveetMavis 23. juli kl. 5:04 
do you think you could add a convar for swapping with the same weapon type?
ValsdalV  [ophavsmand] 28. juni 2024 kl. 5:03 
There's multiple ones already, like for example 'Manual Weapon Pickup' by Sofisaur.

I had to limit this addon to TTT only just because there already was at least that one for the other gamemodes
BonegraVE 27. juni 2024 kl. 22:54 
Someone need to make this addon for sandbox.
ValsdalV  [ophavsmand] 17. mar. 2023 kl. 14:32 
That's odd, I made sure this addon doesn't load when the active gamemode is not TTT. In fact, it works by using functions that are only defined in TTT, so it must be something else that's letting you swap weapons
⸸ₓナイトメアₓ⸸ 17. mar. 2023 kl. 12:20 
oh nono i mean i somehow had this just work in sandbox, i didnt enter the files or anything. although i dont know why this worked
ValsdalV  [ophavsmand] 17. mar. 2023 kl. 11:02 
If you already extracted the code of this addon from the .gma file to make it work for sandbox, then instead of making the player drop the weapon

[code]Player:DropWeapon(Weapon)[/code]

just remove that gun:

[code]
if IsValid(Weapon) then
Weapon:Remove()
end
[/code]
⸸ₓナイトメアₓ⸸ 17. mar. 2023 kl. 3:58 
i see where your coming from, you dont have to. it was just a thought because i somehow got this to work for sandbox andi was messing around with friends and over a good 20 minutes or so the game started to lagg because the weapons kept piling on top of each other
ValsdalV  [ophavsmand] 16. mar. 2023 kl. 10:36 
Something like that can potentially ruin the game for other players, for example running around the map using it to delete weapons before anyone else has a chance to pick them up.

I guess it can be nice to have when playing with friends, I'll see what I can do
⸸ₓナイトメアₓ⸸ 13. mar. 2023 kl. 16:51 
is there a way to have a swapped weapon disappear forever? like in cod zombies for example, swapped weapons are gone for good