--This file contains things to help developers debug while working on the code. All this stuff relies on the Developers table in configre_me.lua local pmeta = FindMetaTable( "Player" ) function pmeta:IsDeveloper() for k,v in pairs(GMS.Developers) do if(self:SteamID() == v) then return true end end return false end -----------------Print inventory--------------------- local printServerResources = function(ply,cmd,args) if(CLIENT or (!ply:IsDeveloper())) then return end PrintTable(ply.Resources) end local printServerResourcesAuto = function(cmd,args) end concommand.Add("gms_sv_printSvRes",printServerResources,printServerResourcesAuto,"Prints the server representation of your resources") local printClientResources = function(ply,cmd,args) if(SERVER or (!ply:IsDeveloper())) then return end PrintTable(Resources) end local printClientResourcesAuto = function(cmd,args) end concommand.Add("gms_sv_printClRes",printClientResources,printClientResourcesAuto,"Prints the client representation of your resources") ------------------Give weapons---------------------- local giveWeapon = function(ply,cmd,args) if(!ply:IsDeveloper()) then return end if(weapons.Get(args[1]) == nil) then print("Could not find weapon:" .. args[1]) return end ply:Give(args[1]) end local giveWeaponAuto = function(cmd,args) local possibles = {} local needle = string.Trim(args) print("\"" .. needle .. "\"") for k,v in pairs(weapons.GetList()) do local fplace = string.find(v.ClassName,needle) if(fplace != nil) then table.insert(possibles,cmd .. " " .. v.ClassName) end end return possibles end concommand.Add("gms_sv_givewep",giveWeapon,giveWeaponAuto)