Hello, sorry to bother anyone but for some reasons my script is not running as soon as I start a game.
It’s supposed to be the start of a script but it’s a pain to run it manually everytime and it’s not working properly in autorun.
Here’s the script:
concommand.Add("crunch", crunch) function crunch(ply, cmd, args) local target for k,v in pairs(player.GetAll()) do if(string.find(string.lower(v:GetName()), string.lower(args))) then target = v break end end if(IsEntity(target)) then else if(SERVER) then return end print("No player found going by the name of: '"..args.."'") end end
Here’s the path I placed it in:
C:\Program Files (x86)\Steam\steamapps\common\GarrysMod\garrysmod\addons\Crunch\lua\autorun\shared.lua