There is more problems, such as using sometimes 'ply', and sometimes 'pl'...and the 'end's being at a wrong place
Try that (i can't test..):
-- Add your restrected tools here
local Restricted_Tools =
{
"#Anti-NoClip",
"adv_duplicator",
"Gcombat",
"Anti-NoClip",
"linktool",
"stacker",
}
--Add your steam id's that this should not affect
local Allowed_players =
{
"STEAM:1:0:5447",
}
function gettool(ply, tr, toolmode)
if Restricted_Tools[toolmode] then
if not ply:IsAdmin() and not Allowed_players[ply:SteamID()] then
ply:PrintMessage(HUD_PRINTTALK, "ULXAnti-Stool: Sorry but you are not allowed to use this STool !! Complain to the admins :)")
return false
end
end
end
hook.Add( "CanTool", "GetTool", gettool)
-- what is that? need the function UseTool : hook.Add( "CanTool", "UseTool", UseTool );
Also you may need to add commands for admins to add/remove steamids and stools dynamically (and so need some file manipulations to save/read tables - not hard).
Once you get it working perfectly, you can release it as a module
(because actually, it's more a not working snippet