SWEP Scripting

Hi, I just started using lua and I have a few questions concerning SWEPs.

Is it possible to have unlimited ammo for a swep using bullets?

Is it possible to put a trail on said “bullet”?

And how do you create your own custom “bullet”?

  1. You can either set it to near infinite and I would guess with some coding you can just raise the ammo level with each shot so you never loose ammo.

  2. I would assume so, but I’m not sure how you’d do it, I guess just getting a vector from your hitpos to your character and drawing a line from it

  3. I don’t know exactly, I just know its very difficult to create your own ammo type.

  1. I believe you can make it use the ammo “none” but it might be something different, otherwise you can make it use 0 ammo per shot.
  2. You need to make a custom bullet that uses an actual entity
  3. The only way really possible is to create a bullet that uses an actual entity as I said above, Generic default’s GDCW Weapons is a great example to go off of.

Ok, Cool thanks for the help guys.