I am using the Pointshop addon. I’ve looked through Facepunch to see if anyone else has had the same issue, and I’ve found a few but no solution.
I’ve attempted to compile the ideas together for a custom concommand that will allow me to type a console command in the box, and it give points to a player.
On the pointshop side it uses:
I found this solution, but it doesn’t appear to work:
concommand.Add("ps_givepoints", function(ply, cmd, args) -- Give Points if ply:IsPlayer() then return false end local to_give = args local num = tonumber(args) if not to_give or not num then ply:PS_Notify("Please give a name and number!") return end if not type(to_give) == "player" then if to_give then ply:PS_Notify("You weren't specific enough with the name you typed!") else ply:PS_Notify("No player found by that name!") end else to_give:PS_GivePoints(num, "given by " .. ply:Nick() .. "!") end end)
I only want to do it from the actual console in the box (not in garry’s mod in-game console).
Basically I just need this because I’ve linked up points to a mysql database, and I made an rcon connection via PHP and I want to execute the rcon command to give points so I don’t have to go in-game and do it.
I tried injecting the points into the mysql database for the user, which updates fine, but when the server dishes out points every 10 minutes, it overrides that amount.
Any help appreciated.