SWEP.Author = "Demivion" SWEP.Contact = "" SWEP.Purpose = "" SWEP.Instructions = "Left click to select an NPC, right click to move the NPC" SWEP.Spawnable = true SWEP.AdminSpawnable = true SWEP.ViewModel = "models/weapons/v_pistol.mdl" SWEP.WorldModel = "models/weapons/w_pistol.mdl" SWEP.Primary.ClipSize = -1 SWEP.Primary.DefaultClip = -1 SWEP.Primary.Automatic = false SWEP.Primary.Ammo = "none" SWEP.Secondary.ClipSize = -1 SWEP.Secondary.DefaultClip = -1 SWEP.Secondary.Automatic = false SWEP.Secondary.Ammo = "none" local player = LocalPlayer() if SERVER then //Make sure clients download this script. AddCSLuaFile("shared.lua") //Add a console command for clients to use. function selectnpc(player,commandName,args) game.ConsoleCommand("npc_select\n") end function movenpc(player,commandName,args) game.ConsoleCommand("npc_go\n") end concommand.Add("selectnpc",selectnpc) concommand.Add("movenpc",movenpc) end if CLIENT then //When this script is loaded by the clients, have it run the console command we made on the server. LocalPlayer():concommand("selectnpc\n") LocalPlayer():concommand("movenpc\n") end function SWEP:Reload() end function SWEP:Think() end function SWEP:PrimaryAttack() player:concommand("selectnpc\n") end function SWEP:SecondaryAttack() player:concommand("movenpc\n") end