Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if SERVER then
- AddCSLuaFile()
- resource.AddFile("/class_system/sound/changeclass.wav")
- end
- HogwartsRP_class = 1
- HogwartsRP_ClassList = {
- [1] = "Free Time",
- [2] = "Class 1/Charms",
- [3] = "Class 3/Def. Against the DF",
- [4] = "Free Time",
- [5] = "Hagrid's Place",
- [6] = "Class 1/Def. Against the DF",
- [7] = "Astronomy Tower",
- [8] = "Free Time",
- [9] = "Challenge and Battle Room",
- [10] = "Battle Room",
- [11] = "Lockdown",
- [12] = "Class 1/Study of Occlumency",
- [13] = "Class 3/Transfiguration Class",
- [14] = "Grand Hall/Cafeteria Time",
- [15] = "Class 1/Charms Class",
- [16] = "Free Time",
- [17] = "Quiditch/Competition",
- [18] = "Class 5/Study of Muggles",
- [19] = "Free Time",
- [20] = "Class 1/Charms Class",
- [21] = "Class 5/History Class",
- [22] = "Study of Herbology",
- [23] = "Class 4/Potion Class",
- [24] = "Free time",
- [25] = "Class 1/Charms Class",
- [26] = "Class 3/Def. Against the DF",
- [27] = "Challenge and Battle Room",
- [28] = "Free Time",
- [29] = "Hagrid's Place",
- [30] = "Class 1/Def. Against the DF",
- [31] = "Astronomy Tower",--
- }
- if SERVER then
- timer.Create("NextClassBegins",360,0,function()
- HogwartsRP_class = HogwartsRP_class + 1
- if HogwartsRP_class > table.Count(HogwartsRP_ClassList) then HogwartsRP_class = 1 end
- for k,ply in pairs(player.GetAll()) do
- ply:SetNWFloat( "HWRP_Class", HogwartsRP_class )
- ply:SendLua("surface.PlaySound(\"changeclass.wav\")")
- end
- end)
- local function PlyInitSpawn(ply)
- ply:SetNWFloat( "HWRP_Class", HogwartsRP_class )
- end
- hook.Add("PlayerInitialSpawn","SyncClass",PlyInitSpawn)
- else
- hook.Add("HUDPaint","DrawClassDisplay",function()
- if HogwartsRP_ClassList[LocalPlayer():GetNWFloat("HWRP_Class")] != nil then
- surface.SetFont("HarryPFont")
- local add = surface.GetTextSize(HogwartsRP_ClassList[LocalPlayer():GetNWFloat("HWRP_Class")])
- draw.RoundedBox(10,9,20,100 + add,90,Color(28,28,28,150))
- draw.RoundedBox(10,10,21,98 + add,88,Color(28,28,28,150))
- draw.SimpleText(HogwartsRP_ClassList[LocalPlayer():GetNWFloat("HWRP_Class")],"HarryPFont",60,55,Color(255,255,255,255))
- end
- end)
- end
- if CLIENT then
- surface.CreateFont( "HarryPFont", {
- font = "Harry P",
- extended = false,
- size = 32,
- weight = 500,
- blursize = 0,
- scanlines = 0,
- antialias = true,
- underline = false,
- italic = false,
- strikeout = false,
- symbol = false,
- rotary = false,
- shadow = false,
- additive = false,
- outline = false,
- } )
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement