Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- When a client joins
- function Admin:OnUserJoin(user)
- -- Get their rank from the database.
- -- If they don't have one, we're not gonna do anything.
- SQL:Prepare("SELECT * FROM game_ranks WHERE steamid = {0}", {user:SteamID()}
- ):Execute(function(data, args, err)
- if (data) then
- Admin:SetUserRank(user, data[1].rank)
- end
- end)
- -- Are they gagged
- local gagged = user:GetPData("is_gagged", 0)
- if (tonumber(gagged) == 1) then
- user.gagged = true
- Admin:Print(false, "Player ", AC, user:Name(), CW, " joined with a permanent gag and therefore was gagged.")
- end
- -- Are they muted
- local muted = user:GetPData("is_muted", 0)
- if (tonumber(muted) == 1) then
- user.muted = true
- Admin:Print(false, "Player ", AC, user:Name(), CW, " joined with a permanent mute and therefore was muted.")
- end
- -- Everyone network everywhere!
- for k, v in pairs(player.GetHumans()) do
- if not IsValid(v) or (v == user) then continue end
- self:NetworkUserRank(v)
- end
- JAC:StartDataAnalysis(user, false, 0.54)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement