Garry's Mod

Garry's Mod

FA:S 2.0 Alpha SWEPs
Coding a DM Gamemode - How to add attachments to "inventory" without spawning it as an entity?
Hello guys,

I and my friend are currently working on a private gamemode for a LAN party we're having. All of us agree that the base on which this is written is absolutely phenomenal, it's all smooth and realistic.

However, our gamemode currently features a loadout system with different weapons and attachments but instead of giving these attachments to the player they spawn as a box in front of the player, or players are getting stuck in the boxes.

We tried to decompile the .gma file to have a look at your work, but without success for some reason. We couldn't decompile.

In case anyone of you knows (or even the author might be kind enough to answer :) ) how to spawn or give attachments without spawning them as entities, please let me know.

Thanks in advance,
Jonas.
< >
Zobrazuje se 18 z 8 komentářů
hook.Add( "PlayerSpawn", "GiveAttachment", function( ply ) ply:FAS2_PickUpAttachment( [attachment name], [true/false == give/remove] ) end )

This is a simplified version of my TDM Gamemode loadout attachment system.
@whuppo Many thanks! This is exactly what I needed! :)
can you help someone who doesnt know how to code and doesnt know commands on the prompt
FPProductionsGaming původně napsal:
can you help someone who doesnt know how to code and doesnt know commands on the prompt

Google is your best friend.
Garry's Mod Official Wiki Page[wiki.garrysmod.com]
I'm planning to release the gamemode and source code as soon as I finished it. Fully commented. I will set up tutorials as well. GMod has become stagnant, we need more coders!
Is your gamemode ready `?
Not yet, i kinda abandoned it and started over because i wasn't happy with the result. It's half done by now, though.
Anybody there ?
< >
Zobrazuje se 18 z 8 komentářů
Na stránku: 1530 50