Advertisement
Guest User

Untitled

a guest
Aug 16th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. local function PlayerAdvertise(ply, args)
  2. if args == "" then return "" end
  3. local DoSay = function(text)
  4. if text == "" then return end
  5.  
  6. if ply.advertdelay==nil then
  7. ply.advertdelay=0
  8. end
  9. if ply.advertdelay>CurTime() then
  10. Notify(ply,1,4, "You must wait ".. math.Round(ply.advertdelay-CurTime()) .. " seconds in order to advertise again.")
  11. return ""
  12. end
  13.  
  14. for k,v in pairs(player.GetAll()) do
  15. local col = team.GetColor(ply:Team())
  16. TalkToPerson(v, col, LANGUAGE.advert .." "..ply:Nick(), Color(255,255,0,255), text, ply)
  17. end
  18.  
  19. ply.advertdelay=CurTime()+120
  20. end
  21. return args, DoSay
  22. end
  23. AddChatCommand("/advert", PlayerAdvertise)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement