ULX

Author Topic: How to request default clip size  (Read 1655 times)

0 Members and 1 Guest are viewing this topic.

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
How to request default clip size
« on: January 31, 2015, 05:16:12 PM »
Question is in title, how do I get the default clip size for a swep?
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: How to request default clip size
« Reply #1 on: January 31, 2015, 10:57:17 PM »
Theorizing;
weapon.Get = http://wiki.garrysmod.com/page/weapons/Get - Using classname of the swep to grab table info.
Think it would return a table of the items listed here - http://wiki.garrysmod.com/page/Structures/SWEP
Within that table is yet one more table called Primary that contains default ammo, and another called Secondary containing default ammo.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: How to request default clip size
« Reply #2 on: February 04, 2015, 09:45:40 AM »
Though I already replied to this. Thank you, I got it to work, except with non-swep... I don't understand why Garry just doesn't remake them.. they can so many problems with Garry's Mod.
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.