Garry's Mod

Garry's Mod

CS:GO Knives SWEPs
Alina_Spielt 31 Oct, 2017 @ 6:49am
Remove/change Knive from slot 7 ?? PLS HELP !!
I like the knifes A LOT but if I buy them in the Pointshop they're in slot 7, that's the slot for most Traitor items. You need to trow the knife away to make space for the traitor item. And my question is, how to get the knife on another slot or replace it with the crowbar.

this is in the "csgo_bayonet.lua" for e.g.
C:\...\csgo_knives_sweps-master\lua\weapons\csgo_bayonet.lua

if ( CLIENT ) then
SWEP.Slot = TTT and 6 or 2
SWEP.SlotPos = 0
end

I already tried to copy it under the code of the csgo_bayonet.lua in the pointshop folder.
C:\csgo_knives_sweps-master\lua\pointshop\items\weapons

ITEM.Name = 'Bayonet Knife'
ITEM.Price = 20000
ITEM.Model = 'models/weapons/w_csgo_bayonet.mdl'
ITEM.Skin = 0
ITEM.WeaponClass = 'csgo_bayonet'

function ITEM:OnEquip(ply)
ply:Give(self.WeaponClass)
end

function ITEM:OnBuy(ply)
ply:Give(self.WeaponClass)
ply:SelectWeapon(self.WeaponClass)
end

function ITEM:OnSell(ply)
ply:StripWeapon(self.WeaponClass)
end

function ITEM:OnHolster(ply)
ply:StripWeapon(self.WeaponClass)
end

if ( CLIENT ) then
SWEP.Slot = TTT and 6 or 2
SWEP.SlotPos = 0
end

like this. But it didn't work.
< >
Showing 1-1 of 1 comments
xdshot  [developer] 31 Oct, 2017 @ 8:32am 
In each knife lua:

> SWEP.Slot = TTT and 6 or 2

Instead 6 you type desired slot number, starting from 0. For ex. if you want it in slot 2, you type 1.
< >
Showing 1-1 of 1 comments
Per page: 1530 50