Guest User

Untitled

a guest
Jul 23rd, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. if (SERVER) then
  2.  
  3. AddCSLuaFile("chatlink.lua")
  4. print("Steam Group linking script by Teddi loaded!")
  5.  
  6. local GroupID = "Volex_Gaming"
  7.  
  8. local JoinMsgs = {
  9. "%p has used /join to check out our steam community!",
  10. "%p is so cool, he knows how to use /join!",
  11. "Why not try to use /join, %p has tried it and he loves it!",
  12. }
  13.  
  14. local function SendSteamURL(ply,txt)
  15. local stext = string.lower( txt )
  16. local length = string.len( stext )
  17. if length != 5 && stext !="/join" then return end
  18.  
  19. umsg.Start("SteamGroupURL",ply)
  20. umsg.String(GroupID)
  21. umsg.End()
  22.  
  23. local idx = math.random(#JoinMsgs)
  24. local msg = JoinMsgs[idx]:Format(ply:Nick())
  25.  
  26. for _,plys in pairs(player.GetAll()) do
  27. plys:PrintMessage(HUD_PRINTTALK,msg )
  28. end
  29.  
  30.  
  31. end
  32. AddChatCommand("/join", SendSteamURL)
  33. end
  34.  
  35.  
  36. if (CLIENT) then
Add Comment
Please, Sign In to add comment