• Make an Anti-Spam
    2 replies, posted
Hey i would like to make an anti spam function of 30 minutes for all players wth that kind of code : [CODE]local DermaPanel = vgui.Create( "DFrame" ) DermaPanel:SetPos( 100, 100 ) DermaPanel:SetSize( 300, 200 ) DermaPanel:SetTitle( "My new Derma frame" ) DermaPanel:SetDraggable( true ) DermaPanel:MakePopup() local DermaButton = vgui.Create( "DButton") DermaButton:SetParent( DermaPanel ) DermaButton:SetText( "Say hi" ) DermaButton:SetPos( 25, 50 ) DermaButton:SetSize( 250, 30 ) DermaButton.DoClick = function() RunConsoleCommand( "say", "Hi" ) end[/CODE] I would like that if one player use this button, all the players have to wait 30 minutes to use this button again. Hope i was clear sorry if I wasn't, Thank you for reading, Reese Roite
Create a timer using [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/timer/Create]timer.Create[/url] and if [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/timer/Exists]timer.Exists[/url], then don't let them click the button
Thank you men, gonna try [editline]13th June 2016[/editline] Works perfectly thank you men
Sorry, you need to Log In to post a reply to this thread.