• Print

Author Topic: Make a weapon both for detective and traitor - ttt  (Read 4904 times)

0 Members and 1 Guest are viewing this topic.

Offline Dharmvir Sidhu

  • Newbie
  • *
  • Posts: 18
  • Karma: 1
    • OMENS Gaming
Make a weapon both for detective and traitor - ttt
« on: December 20, 2014, 07:43:38 pm »
Hey everyone,

I recently added some new items like the defib and grappling hook and was able to add them successfully, however I wanted to make them both available for a traitor, and a detective but was not able to successfully do so. Could anyone guide me through this or maybe give me the lua code?

Thanks,
Dharmvir

(sorry if this is the wrong section in the forums)

Offline Bytewave

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 718
  • Karma: 116
  • :)
    • My Homepage
Re: Make a weapon both for detective and traitor - ttt
« Reply #1 on: December 20, 2014, 09:20:51 pm »
Code: Lua
  1. SWEP.CanBuy = { ROLE_TRAITOR, ROLE_DETECTIVE }
Not really that hard.
Drop that line in place of your current weapons' SWEP.CanBuy entry.
bw81@ulysses-forums ~ % whoami
Homepage

Offline Dharmvir Sidhu

  • Newbie
  • *
  • Posts: 18
  • Karma: 1
    • OMENS Gaming
Re: Make a weapon both for detective and traitor - ttt
« Reply #2 on: December 20, 2014, 10:33:27 pm »
thank you! im stupid. i tried adding another line for traitor as well as detective and then even went on to create another .lua file when the answer was that simple.

  • Print