Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function PlayerAdvertise(ply, args)
- if args == "" then return "" end
- local DoSay = function(text)
- if text == "" then return end
- if ply.advertdelay==nil then
- ply.advertdelay=0
- end
- if ply.advertdelay>CurTime() then
- Notify(ply,1,4, "You must wait ".. math.Round(ply.advertdelay-CurTime()) .. " seconds in order to advertise again.")
- return ""
- end
- for k,v in pairs(player.GetAll()) do
- local col = team.GetColor(ply:Team())
- TalkToPerson(v, col, LANGUAGE.advert .." "..ply:Nick(), Color(255,255,0,255), text, ply)
- end
- ply.advertdelay=CurTime()+120
- end
- return args, DoSay
- end
- AddChatCommand("/advert", PlayerAdvertise)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement