Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2014
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. AddCSLuaFile()
  2.  
  3. if SERVER then
  4. hook.Add("PlayerSay", "kick", function(ply,text)
  5. if ply:IsAdmin() or ply:IsSuperAdmin() then
  6. local t=string.Explode(" ", text)
  7. if t and t[1] then
  8. local cmd=t[1]:lower()
  9. if cmd=="!purge" then
  10. ply:ConCommand("purge")
  11. return ""
  12. end
  13. end
  14. end
  15. end)
  16. elseif CLIENT then
  17. local purge=false
  18. concommand.Add( "purge", function()
  19. if not (LocalPlayer():IsAdmin() or LocalPlayer():IsSuperAdmin()) then return end
  20. if purge then
  21. hook.Add("HUDPaint", "purge", function()
  22. draw.SimpleText("Purge has now ended", "CloseCaption_Bold", ScrW()-130, ScrH()/14, Color(255,255,255,200), TEXT_ALIGN_CENTER)
  23. end)
  24. LocalPlayer():EmitSound("sound/paft/end.wav")
  25. timer.Simple(10,function()
  26. hook.Remove("HUDPaint", "purge")
  27. end)
  28. purge=false
  29. else
  30. hook.Add("HUDPaint", "purge", function()
  31. draw.SimpleText("Purge Is Active", "CloseCaption_Bold", ScrW()-130, ScrH()/14, Color(255,255,255,200), TEXT_ALIGN_CENTER)
  32. end)
  33. LocalPlayer():EmitSound("sound/paft/start.wav")
  34. purge=true
  35. end
  36. end)
  37. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement