Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- AddCSLuaFile()
- if SERVER then
- hook.Add("PlayerSay", "purge", function(ply,text)
- if ply:IsAdmin() or ply:IsSuperAdmin() then
- local t=string.Explode(" ", text)
- if t and t[1] then
- local cmd=t[1]:lower()
- if cmd=="!purge" then
- ply:ConCommand("purge")
- return ""
- end
- end
- end
- end)
- elseif CLIENT then
- local purge=false
- local purgeending=false
- concommand.Add( "purge", function()
- if not (LocalPlayer():IsAdmin() or LocalPlayer():IsSuperAdmin()) then return end
- if purge and not purgeending then
- hook.Add("HUDPaint", "purge", function()
- draw.SimpleText("Purge has now ended", "CloseCaption_Bold", ScrW()-130, ScrH()/14, Color(255,255,255,200), TEXT_ALIGN_CENTER)
- end)
- LocalPlayer():EmitSound("paft/end.wav")
- timer.Simple(10,function()
- hook.Remove("HUDPaint", "purge")
- purgeending=false
- purge=false
- end)
- purgeending=true
- elseif not purge then
- hook.Add("HUDPaint", "purge", function()
- draw.SimpleText("Purge Is Active", "CloseCaption_Bold", ScrW()-130, ScrH()/14, Color(255,255,255,200), TEXT_ALIGN_CENTER)
- end)
- LocalPlayer():EmitSound("paft/start.wav")
- purge=true
- end
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement