Skip to content

Commit

Permalink
fix(pts_fixer): Points fixer commands can only be run via rcon/server…
Browse files Browse the repository at this point in the history
… console
  • Loading branch information
ValentinFunk committed Oct 27, 2017
1 parent e8a99d8 commit a587387
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion lua/ps2/server/pts_fixer.lua → lua/ps2/server/sv_pts_fixer.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
local function fixPts()
local function fixPts(ply, cmd, args)
if IsValid(ply) then
ply:ChatPrint("Please run this command via rcon/server console")
return
end

if not Pointshop2 or not Pointshop2.DB or not Pointshop2.DB.ConnectionPromise then
MsgC(Color(255, 0, 0), "ERROR: Pointshop2 is not loaded yet. Please rerun.")
return
Expand Down Expand Up @@ -38,6 +43,11 @@ end
concommand.Add("ps2_fixpoints", fixPts)

local function setPointsGlobal(ply, cmd, args)
if IsValid(ply) then
ply:ChatPrint("Please run this command via rcon/server console")
return
end

if not Pointshop2 or not Pointshop2.DB or not Pointshop2.DB.ConnectionPromise then
MsgC(Color(255, 0, 0), "ERROR: Pointshop2 is not loaded yet. Please rerun.")
return
Expand Down Expand Up @@ -76,6 +86,11 @@ concommand.Add("ps2_setwallet_all", setPointsGlobal)


local function updatePoints(ply, cmd, args)
if IsValid(ply) then
ply:ChatPrint("Please run this command via rcon/server console")
return
end

if not Pointshop2 or not Pointshop2.DB or not Pointshop2.DB.ConnectionPromise then
MsgC(Color(255, 0, 0), "ERROR: Pointshop2 is not loaded yet. Please rerun.")
return
Expand Down

0 comments on commit a587387

Please sign in to comment.