• Paying - Weapon Holster Systen
    10 replies, posted
I have £20 to spend if its a really good system but i need the following things: - Weapons are on your back/in your holster when not in use. - Drawn weapons can be put in a stance so you are holding it but not aiming and cannot fire them. (Like OA/Clockwork) Give me the 2 scripts for that and make sure they work fully and i will pay you. PS: I dont do weapons myself and dont really want to start and thats why im asking here. Add me on steam: modegg
You can prolly scavenge this from a game mode like tiramisu.
Ive got someone doing it already thanks.
-snip-
It says 2 more people have commented but the posts are not showing up. What the hell?
Credit for Jvs [lua] /* Jvs:this script will allow you to see your/others weapons directly on the body when in thirdperson every weapon needs a different bone/drawfunction/boneoffset,however,drawfunction can be nil boneoffsets will be retrieved from a custom table,so,if there's a pistol,it will draw it on the hips,heavy weapons on the back etc etc WARNING:drawfunction will NOT draw the model,it will draw an effect or whatever you want,the model is drawn before this function gets called i know,there's no gui/derma to modify the bones,i'm used to modify them directly in the .lua file,just look at the these hl2 weapons examples */ local holsteredgunsconvar = CreateConVar( "cl_holsteredguns", "1", { FCVAR_ARCHIVE, }, "Enable/Disable the rendering of the weapons on any player" ) local NEXT_WEAPONS_UPDATE=CurTime(); local physgunmat=Material("sprites/physg_glow1") local physgunmat1=Material("sprites/physg_glow2") local weaponsinfos={} weaponsinfos["weapon_physcannon"]={} weaponsinfos["weapon_physcannon"].Model="models/weapons/w_physics.mdl" weaponsinfos["weapon_physcannon"].Bone="ValveBiped.Bip01_Spine1" weaponsinfos["weapon_physcannon"].BoneOffset={Vector(6,15,0),Angle(90,180,0)}//offset,weapon angle weaponsinfos["weapon_physcannon"].Priority="weapon_physgun" //this means that if the weapon_physgun can be drawn,we will not weaponsinfos["weapon_physgun"]={} weaponsinfos["weapon_physgun"].Model="models/weapons/w_physics.mdl" weaponsinfos["weapon_physgun"].Bone="ValveBiped.Bip01_Spine1" weaponsinfos["weapon_physgun"].DrawFunction=function(ent) end /* draw custom core to make it look like it's on */ weaponsinfos["weapon_physgun"].BoneOffset={Vector(6,15,0),Angle(90,180,0)}//offset,weapon angle weaponsinfos["weapon_physgun"].Skin=1; //we can set custom skin too,but only once,remember that weaponsinfos["weapon_physgun"].DrawFunction=function(ent) local attachment=ent:GetAttachment( 1) local StartPos = attachment.Pos + attachment.Ang:Forward()*4 render.SetMaterial(physgunmat) render.DrawSprite(attachment.Pos,20,20,Color(255,255,255,255)); render.SetMaterial(physgunmat1) render.DrawSprite(StartPos,20,20,Color(255,255,255,255)); end weaponsinfos["weapon_pistol"]={} weaponsinfos["weapon_pistol"].Model="models/weapons/W_pistol.mdl" weaponsinfos["weapon_pistol"].Bone="ValveBiped.Bip01_Pelvis" weaponsinfos["weapon_pistol"].BoneOffset={Vector(0,-8,0),Angle(0,90,0)}//offset,weapon angle weaponsinfos["weapon_357"]={} weaponsinfos["weapon_357"].Model="models/weapons/W_357.mdl" weaponsinfos["weapon_357"].Bone="ValveBiped.Bip01_Pelvis" weaponsinfos["weapon_357"].BoneOffset={Vector(-5,8,0),Angle(0,270,0)}//offset,weapon angle weaponsinfos["weapon_357"].Priority="gmod_tool" weaponsinfos["gmod_tool"]={} weaponsinfos["gmod_tool"].Bone="ValveBiped.Bip01_Pelvis" weaponsinfos["gmod_tool"].BoneOffset={Vector(-5,8,0),Angle(0,270,0)}//offset,weapon angle weaponsinfos["weapon_frag"]={} weaponsinfos["weapon_frag"].Model="models/Items/grenadeAmmo.mdl" weaponsinfos["weapon_frag"].Bone="ValveBiped.Bip01_Pelvis" weaponsinfos["weapon_frag"].BoneOffset={Vector(3,-5,6),Angle(-95,0,0)}//offset,weapon angle weaponsinfos["weapon_slam"]={} weaponsinfos["weapon_slam"].Model="models/weapons/w_slam.mdl" weaponsinfos["weapon_slam"].Bone="ValveBiped.Bip01_Spine2" weaponsinfos["weapon_slam"].BoneOffset={Vector(-9,0,-7),Angle(270,90,-25)}//offset,weapon angle weaponsinfos["weapon_crowbar"]={} weaponsinfos["weapon_crowbar"].Model="models/weapons/w_crowbar.mdl" weaponsinfos["weapon_crowbar"].Bone="ValveBiped.Bip01_Spine1" weaponsinfos["weapon_crowbar"].BoneOffset={Vector(3,0,0),Angle(0,0,45)}//offset,weapon angle weaponsinfos["weapon_stunstick"]={} weaponsinfos["weapon_stunstick"].Model="models/weapons/W_stunbaton.mdl" weaponsinfos["weapon_stunstick"].Bone="ValveBiped.Bip01_Spine1" weaponsinfos["weapon_stunstick"].BoneOffset={Vector(3,0,0),Angle(0,0,-45)}//offset,weapon angle weaponsinfos["weapon_shotgun"]={} weaponsinfos["weapon_shotgun"].Model="models/weapons/W_shotgun.mdl" weaponsinfos["weapon_shotgun"].Bone="ValveBiped.Bip01_R_Clavicle" weaponsinfos["weapon_shotgun"].BoneOffset={Vector(10,5,2),Angle(0,90,0)}//offset,weapon angle weaponsinfos["weapon_rpg"]={} weaponsinfos["weapon_rpg"].Model="models/weapons/w_rocket_launcher.mdl" weaponsinfos["weapon_rpg"].Bone="ValveBiped.Bip01_L_Clavicle" weaponsinfos["weapon_rpg"].BoneOffset={Vector(-16,5,0),Angle(90,90,90)}//offset,weapon angle weaponsinfos["weapon_smg1"]={} weaponsinfos["weapon_smg1"].Model="models/weapons/w_smg1.mdl" weaponsinfos["weapon_smg1"].Bone="ValveBiped.Bip01_Spine1" weaponsinfos["weapon_smg1"].BoneOffset={Vector(5,0,-5),Angle(0,0,230)}//offset,weapon angle weaponsinfos["weapon_ar2"]={} weaponsinfos["weapon_ar2"].Model="models/weapons/W_irifle.mdl" weaponsinfos["weapon_ar2"].Bone="ValveBiped.Bip01_R_Clavicle" weaponsinfos["weapon_ar2"].BoneOffset={Vector(-5,0,7),Angle(0,270,0)}//offset,weapon angle weaponsinfos["weapon_crossbow"]={} weaponsinfos["weapon_crossbow"].Model="models/weapons/W_crossbow.mdl" weaponsinfos["weapon_crossbow"].Bone="ValveBiped.Bip01_L_Clavicle" weaponsinfos["weapon_crossbow"].BoneOffset={Vector(0,5,-5),Angle(180,90,0)}//offset,weapon angle function LPGB(dotrace) if !dotrace then for i=0,LocalPlayer():GetBoneCount()-1 do print(LocalPlayer():GetBoneName(i)) end else local entity=LocalPlayer():GetEyeTrace().Entity if !IsValid(entity) then return end for i=0,entity:GetBoneCount()-1 do print(entity:GetBoneName(i)) end end end local function CalcOffset(pos,ang,off) return pos + ang:Right() * off.x + ang:Forward() * off.y + ang:Up() * off.z; end local function clhasweapon(pl,weaponclass) for i,v in pairs(pl:GetWeapons()) do if string.lower(v:GetClass())==string.lower(weaponclass) then return true end end return false; end local function clgetweapon(pl,weaponclass) for i,v in pairs(pl:GetWeapons()) do if string.lower(v:GetClass())==string.lower(weaponclass) then return v end end return nil; end local function playergettf2class(ply) return ply:GetPlayerClass() end local function IsTf2Class(ply) return LocalPlayer().IsHL2 && !LocalPlayer():IsHL2() end local function GetHolsteredWeaponTable(ply,indx) local class=IsTf2Class(ply) and playergettf2class(ply) or nil if !class then return weaponsinfos[indx] else return (weaponsinfos[indx] && weaponsinfos[indx][class]) and weaponsinfos[indx][class] or nil end end local function thinkdamnit() if !holsteredgunsconvar:GetBool() then return end for _,pl in pairs(player.GetAll()) do if !IsValid(pl) then continue end if !pl.CL_CS_WEPS then pl.CL_CS_WEPS={} end if !pl:Alive() then pl.CL_CS_WEPS={} continue end if NEXT_WEAPONS_UPDATE<CurTime() then pl.CL_CS_WEPS={} NEXT_WEAPONS_UPDATE=CurTime()+5 end for i,v in pairs(pl:GetWeapons())do if !IsValid(v) then continue; end if pl.CL_CS_WEPS[v:GetClass()] then continue end if !pl.CL_CS_WEPS[v:GetClass()] then local worldmodel=v.WorldModelOverride or v.WorldModel //attempt to pick the model from a swep local attachedwmodel=v.AttachedWorldModel; if GetHolsteredWeaponTable(pl,v:GetClass()) && GetHolsteredWeaponTable(pl,v:GetClass()).Model then //damnit,it's not a swep,then try to get it from our local table worldmodel=GetHolsteredWeaponTable(pl,v:GetClass()).Model end if !worldmodel || worldmodel=="" then continue end; //allright,this weapon is not supposed to show up pl.CL_CS_WEPS[v:GetClass()]=ClientsideModel(worldmodel,RENDERGROUP_OPAQUE) pl.CL_CS_WEPS[v:GetClass()]:SetNoDraw(true) pl.CL_CS_WEPS[v:GetClass()]:SetSkin(v:GetSkin()) pl.CL_CS_WEPS[v:GetClass()]:SetColor(v:GetColor()) if GetHolsteredWeaponTable(pl,v:GetClass()) && GetHolsteredWeaponTable(pl,v:GetClass()).Scale then pl.CL_CS_WEPS[v:GetClass()]:SetModelScale(GetHolsteredWeaponTable(pl,v:GetClass()).Scale); end if GetHolsteredWeaponTable(pl,v:GetClass()) && GetHolsteredWeaponTable(pl,v:GetClass()).BBP then pl.CL_CS_WEPS[v:GetClass()].BuildBonePositions=GetHolsteredWeaponTable(pl,v:GetClass()).BBP; end if v.MaterialOverride || v:GetMaterial(
Thank you so much. [img]http://dl.dropbox.com/u/8718166/Shift/winn.png[/img] Its like Matrix all over again.
why do you like having shitloads of models or effects or whatever they are on a persons back... it would be much better maybe only having 1 heavy weapon and one side arm and maybe a grenade on the other side of the hip, also, how did you figure out the angles and offsets?
You just sit there for a while and keep changing and reloading the script till its correct. And it is not like that now, ive neatened it up a lot now.
[QUOTE=Science;31544339]You just sit there for a while and keep changing and reloading the script till its correct. And it is not like that now, ive neatened it up a lot now.[/QUOTE] Or you can use PAC.
[QUOTE=Amokov;31544700]Or you can use PAC.[/QUOTE]No. This is for my gamemode. I dont want a addon doing it.
Sorry, you need to Log In to post a reply to this thread.