First, you need to fix a few things: 1, net library uses callback as second argument, so the )
should only be at the end of the block. And indentation is important...
net.Receive("Player:SetUserGroup", function(len, ply)
if not IsValid(ply) or not ply:IsPlayer() then return end
if ply.ADLTable["GoodResponse"] >= (ADLTableCount*ADL.CompletePourcent)/100 then
Player:SetUserGroup( clonetrooper )
end
end )
Second: what is the content of the ADLTable attached to the player?
Third: You should use ULIB (ulx uses it) to add users to usergroups.
ucl.addUser( ply:SteamID64(),
nil,
nil,
"clonetrooper",
false)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…