I know that every weapon need to derive from weapon_tttbase.
I was wondering why.
Why cant I just use for example the FAS:S Weapon on my TTT Server?
Is there any way to just recode the FAS:S Base to make it compatible with TTT or something?
I just dont know why every weapon need to have SWEP.Base "weapon_tttbase".
Would be nice if someone can explain this to me.
Regards,
Pascal
It's not about weapon base, it's about the variables in the SWEP table. Certain variables must be present in the SWEP table or TTT gamemode will remove the SWEP from the map/player inventory.
[editline]21st June 2015[/editline]
From my Nyan Gun:
[code]
/* --------------------------------- TTT ---------------------------------- */
SWEP.EquipMenuData = {
type = "item_weapon",
desc = [[The Nyan Gun. Provides:
* Blown cover
* Annoying sounds
* Kind of a lot of ammo
* Annoyingly small damage]]
}
SWEP.Icon = "nyan/ttt_icon.png"
SWEP.Kind = WEAPON_EQUIP2
SWEP.CanBuy = { ROLE_TRAITOR }
SWEP.LimitedStock = true
if ( GAMEMODE.Name == "Trouble in Terrorist Town" ) then
SWEP.Primary.Damage = 5
SWEP.Primary.ClipSize = 128
SWEP.Primary.DefaultClip = 128
SWEP.Primary.ClipMax = 128
SWEP.Slot = 6
end
function SWEP:IsEquipment() return false end
/* ------------------------------ END OF TTT ------------------------------ */[/code]
Feel free to use this snippet of code.
This must be in every SWEP you want to be usable of in TTT, with proper values of course.
Nothing is preventing you from using a different base. I use a custom weapon base on my TTT server.
Wait... That means I just need to provide all the Information TTT needs in the SWEP (SWEP.CanBuy etc) and I can use another weapon base? Wow, that sounds really great. Thanks for your help!
[QUOTE=P4sca1;48015001]Wait... That means I just need to provide all the Information TTT needs in the SWEP (SWEP.CanBuy etc) and I can use another weapon base? Wow, that sounds really great. Thanks for your help![/QUOTE]
As long as you have a way to retrieve it. The map won't automatically place them.
Sorry, you need to Log In to post a reply to this thread.