Last active
May 12, 2021 05:48
-
-
Save meepen/050993ac93dd0afd0125 to your computer and use it in GitHub Desktop.
antigarry - idea by leystryku
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hook.Add("FakeIDDetect", "FakeIDDetectExample", function(ply) | |
chat.AddText(Color(255,0,0,255), ply:Nick().." has a fake id. Do not let him fool you. If you are an admin please ban him."); | |
end); | |
steamids = steamids or {}; | |
local Old = FindMetaTable"Player".SteamID64; | |
net.Receive("weapon_smg1", function(len, cl) | |
local ent = net.ReadEntity(); | |
steamids[ent] = net.ReadString(); | |
print(Old(ent), steamids[ent]); | |
if (steamids[ent] ~= Old(ent)) then | |
hook.Run("FakeIDDetect", ent); | |
end | |
end); | |
FindMetaTable"Player".SteamID64 = function(self) | |
return steamids[self] or "0"; | |
end | |
FindMetaTable"Player".SteamID = function(self) | |
return util.SteamIDFrom64(steamids[self]); | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function SendSteamID(target) | |
timer.Simple(1, function() | |
net.Start"weapon_smg1" | |
net.WriteEntity(target); | |
net.WriteString(target:SteamID64()); | |
net.Broadcast(); | |
for k,v in pairs(player.GetAll()) do | |
net.Start"weapon_smg1" | |
net.WriteEntity(v); | |
net.WriteString(v:SteamID64()); | |
net.Send(target); | |
end | |
end); | |
end | |
hook.Add("PlayerInitialSpawn", "AntiGarry", SendSteamID); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment