Possible cloudgaming money exploit
How would you make this an exploit?
Code:
local function rewardply(ply)
if not IsValid(ply) then return end
ply:addMoney(reward)
-- Please for the love of god don't make this exploitable ROAST
ply:SendLua([[chat.AddText(Color(255,0,0),"Thanks for joining our group! You have been given $]] .. string.Comma(reward) .. [[!")]])
file.Append("groupnag.txt",ply:SteamID64() .. "\n")
nagsids = nagsids .. ply:SteamID64() .. "\n"
end
net.Receive("naggroup",function(_,ply)
local sid = ply:SteamID64()
if hasreward(sid) then
ply:SendLua([[chat.AddText(Color(255,0,0),"You are already in the group!")]])
return end
if ply.GettingNag then return end
ply:SendLua([[chat.AddText(Color(255,0,0),"Checking group membership in 30 seconds...")]])
ply.GettingNag = true
timer.Simple(30,function()
if not IsValid(ply) then return end
local url = "steamcommunity.com/profiles/" .. sid .."/?xml=1"
http.Fetch(url,function(b)
local a = b:match(gid)
if a then
if IsValid(ply) then
rewardply(ply)
return
end
else
ply:SendLua([[chat.AddText(Color(255,0,0),"Failed to get group status! Make sure your profile is public and try again!")]])
end
end)
end)
end)
print("Loaded group nag on ".. gid)
end