Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (SERVER) then
- AddCSLuaFile("chatlink.lua")
- print("Steam Group linking script by Teddi loaded!")
- local GroupID = "Volex_Gaming"
- local JoinMsgs = {
- "%p has used /join to check out our steam community!",
- "%p is so cool, he knows how to use /join!",
- "Why not try to use /join, %p has tried it and he loves it!",
- }
- local function SendSteamURL(ply,txt)
- local stext = string.lower( txt )
- local length = string.len( stext )
- if length != 5 && stext !="/join" then return end
- umsg.Start("SteamGroupURL",ply)
- umsg.String(GroupID)
- umsg.End()
- local idx = math.random(#JoinMsgs)
- local msg = JoinMsgs[idx]:Format(ply:Nick())
- for _,plys in pairs(player.GetAll()) do
- plys:PrintMessage(HUD_PRINTTALK,msg )
- end
- end
- AddChatCommand("/join", SendSteamURL)
- end
- if (CLIENT) then
Add Comment
Please, Sign In to add comment