Welcome, Guest. Please login or register.
Did you miss your activation email?
November 22, 2024, 03:06:03 AM
Home Help Login Register
News: Trouble in Terrorist Town? Site here, forum here.

Zombie Master  |  Other  |  Trouble in Terrorist Town  |  Topic: Custom sweps
Pages: [1]
Author Topic: Custom sweps  (Read 5307 times)
MARSHMALLOW
Poster

Posts: 19

3XIT GAMING


« on: October 20, 2011, 12:13:08 AM »

Ive been trying my best at lua to get Opx's weapons to work in ttt
ive so far managed to get the guns to appear in the game and pickup the right ammo and all but the guns dont seem to use it :S

could someone be kind enough to check my lua for any errors thanks


http://pastebin.com/X0BwB2AU

Cos it's fun that way XD
sniperduck
Poster

Posts: 178


|:NxS:| Staff! :D


« Reply #1 on: October 20, 2011, 06:54:36 PM »

The reason most dont work is the missing variables from the old base(the one that was used before you put in thetweapon_ttbase) The old base had things in it that set up some functions in the weapon, when you switched the bases it dosnt know what to do with those functions.

Example:
SWEP.Primary.KickUp                     = 0.3                                   // Maximum up recoil (rise)
SWEP.Primary.KickDown                   = 0.3                                   // Maximum down recoil (skeet)
SWEP.Primary.KickHorizontal                     = 0.3                                   // Maximum up recoil (stock)


With that said, you could alter the base.

Overtime these forums have made me an asshole. ;D (TTT subforum)
|:NxS:| Custom TTT Server: source.nxs-gaming.com:27016
|:NxS:| Vanilla TTT Server: source.nxs-gaming.com:27016
|:NxS:| Fretta: <COMING SOON>
MARSHMALLOW
Poster

Posts: 19

3XIT GAMING


« Reply #2 on: October 20, 2011, 07:51:57 PM »

unfortunately that inst the problem

the main problem is ammo

for some reason the guns don't want to use the ammo in game
I can walk over the ammo entities and it picks them up but does not count them in ammo
:S

I originally used the sweps base then changed to the ttt base thinking it might fix it but I had the same problem in both but im gonna look in the original base and see if anything might need copying over
thanks

Cos it's fun that way XD
BipolarDiZ
Poster

Posts: 101


|:NxS:| Staff! :D


« Reply #3 on: October 20, 2011, 10:43:53 PM »

I might be wrong but I think its because you haven't specified what the primary ammo is with SWEP.Primary.Ammo = "Pistol"
With that said try that out in the code and lemme know if it fixes it. If not I will load up the script on my server and see whats up. But in the 5 sec glance I had at the code that seemed like the main issue. (Also recommend getting rid of functions that don't work like sniper said.) Also personally I feel that editing the base is unneeded for most everything because in reality everything you need in already defined in the base. Only thing I am going to eventually edit the base for is a burst fire famas but as of now its not really important.
« Last Edit: October 20, 2011, 10:51:53 PM by BipolarDiZ »

BipolarDiZ is bipolar.
|:NxS:| Custom TTT Server: source.nxs-gaming.com:27015
|:NxS:| Vanilla TTT Server: source.nxs-gaming.com:27016
|:NxS:| Fretta: currently offline
MARSHMALLOW
Poster

Posts: 19

3XIT GAMING


« Reply #4 on: October 21, 2011, 12:59:20 PM »

MY GOD
YOU ARE A FUCKING GENIUS AND I WILL FOREVER LOVE YOU FOR IT

that said I don't know how i missed that detail but thanks :P

Cos it's fun that way XD
BipolarDiZ
Poster

Posts: 101


|:NxS:| Staff! :D


« Reply #5 on: October 21, 2011, 01:53:54 PM »

You are very welcome and I am glad I could help you! :D

BipolarDiZ is bipolar.
|:NxS:| Custom TTT Server: source.nxs-gaming.com:27015
|:NxS:| Vanilla TTT Server: source.nxs-gaming.com:27016
|:NxS:| Fretta: currently offline
sniperduck
Poster

Posts: 178


|:NxS:| Staff! :D


« Reply #6 on: October 21, 2011, 08:26:31 PM »

Nice on having it fixed i guess your response is what i get for skimming the OP... oops.

Overtime these forums have made me an asshole. ;D (TTT subforum)
|:NxS:| Custom TTT Server: source.nxs-gaming.com:27016
|:NxS:| Vanilla TTT Server: source.nxs-gaming.com:27016
|:NxS:| Fretta: <COMING SOON>
Pages: [1]
Zombie Master  |  Other  |  Trouble in Terrorist Town  |  Topic: Custom sweps « previous next »
Jump to:  


Login with username, password and session length

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines
Page created in 0.011 seconds with 18 queries.