how do (write) I own a gun?

sorry for my bad english but how do I own a gun for gmod.
I mean, how you write a simple gun?

(User was banned for this post ("Wrong forum" - mahalis))

make: gun
shoot: bullits
owner: I


I do not get it

Read the article, understand the language, interpret the functions, replicate with modifications.

can you show me an example?

That page was the example…

yes but there is much text :slight_smile:

coding generally requires a lot of text.

I’ve read but how you put it in lua?

Just… don’t learn it.


Just leave this section for the sake of all of us. Saves some space which would be used by the 5-second-SWEP thread too.

sorry but I wanted to try like

If you haven’t learnt basic lua syntax, learn it!
Read through the page again, slowly. Advice: Don’t be impatient, don’t try to rush through it, especially if you haven’t coded before. If you do you’ll mess up or you won’t understand how to do it.
At first don’t change anything, just do what the page says. When you’re done, try it out.
Make some changes once you’re confident. For example, SWEP.PrintName is pretty obvious - you could change this to “EPIC LASER” or something.

DON’T expect this to be really easy and simple, especially not if it’s your first attempt at coding in lua (or indeed making a SWEP).

If it’s tl;dr: You’re not for coding. Bye.