Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Clientside of usermessage test
- function scShowWire()
- local ply = LocalPlayer()
- ply:RunConsoleCommand("wire_printversion")
- end
- function scHookJoin(scJoinPacket)
- scShowWire()
- local usergroup = scJoinPacket:ReadString()
- if (usergroup == "guest") then
- chat.AddText(Color(184,138,0),"Welcome to the [#1] ShankShock Build Server! Please respect the players and admins, they work hard to keep it up.")
- chat.PlaySound()
- end
- if (usergroup == "blu") then
- chat.AddText(Color(184,138,0),"Welcome back, ",Color(35,104,142),"Blu",Color(184,138,0), " member! Forgot your abilities? Check the help menu.")
- chat.PlaySound()
- end
- if (usergroup == "gold") then
- chat.AddText(Color(184,138,0),"Welcome back, ",Color(204,153,0),"Gold",Color(184,138,0), " member! Forgot your abilities? Check the help menu.")
- chat.PlaySound()
- end
- if (usergroup == "silver") then
- chat.AddText(Color(184,138,0),"Welcome back, ",Color(160,160,160),"Diamond",Color(184,138,0), " member! Forgot your abilities? Check the help menu.")
- chat.PlaySound()
- end
- if (usergroup == "shank") then
- chat.AddText(Color(184,138,0),"Welcome back, ",Color(255,185,15),"Shank!",Color(184,138,0), " Forgot your abilities? Check the help menu.")
- chat.PlaySound()
- end
- if (usergroup == "superadmin") then
- chat.AddText(Color(184,138,0),"Welcome back, ",Color(255,51,51),"Server Owner!",Color(184,138,0), " Question? Comment? Message shank for 110% better customer support!")
- chat.PlaySound()
- end
- if (usergroup == "admin") then
- chat.AddText(Color(184,138,0),"Welcome back, ",Color(0,255,51),"Admin!",Color(184,138,0), " Question? Comment? Message shank for 110% better customer support!")
- chat.PlaySound()
- end
- end
- function showMotd()
- local ply = LocalPlayer() --Ply isn't defined on the client
- local BackGround = vgui.Create("DFrame")
- BackGround:SetSize(600,300)
- BackGround:SetPos( (ScrW()/2)-(BackGround:GetWide()/2),(ScrH()/2)-(BackGround:GetTall()/2))
- BackGround:SetTitle("ShankShock MOTD")
- BackGround:SetVisible(true)
- BackGround:SetDraggable(false)
- BackGround:ShowCloseButton(true)
- BackGround:MakePopup()
- BackGround.Paint = function()
- draw.RoundedBox(4,0,0,BackGround:GetWide(), BackGround:GetTall(), Color(242,242,242,200))
- draw.RoundedBox(2,2,2,BackGround:GetWide()-4,21, Color(50,50,50,200))
- end
- end
- concommand.Add("scoin_show_motd", showMotd)
- usermessage.Hook("scoin_join_packet", scHookJoin)
Advertisement
Add Comment
Please, Sign In to add comment