aboutsummaryrefslogtreecommitdiff
path: root/gamemode/shared/prayersystem/prayers/notdarkrp.lua
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2016-10-24 12:10:40 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2016-10-24 12:10:40 -0400
commit09de17b25912ca1ed79afcf9ecfc3291fe34a96d (patch)
tree82e842a8cfe8247b44cf6a778eca54a4beb08995 /gamemode/shared/prayersystem/prayers/notdarkrp.lua
parent3347d78a48e08084606e8902d6580a025ab2f793 (diff)
downloadartery-09de17b25912ca1ed79afcf9ecfc3291fe34a96d.tar.gz
artery-09de17b25912ca1ed79afcf9ecfc3291fe34a96d.tar.bz2
artery-09de17b25912ca1ed79afcf9ecfc3291fe34a96d.zip
fixed prayers to work with the prayer system
Diffstat (limited to 'gamemode/shared/prayersystem/prayers/notdarkrp.lua')
-rw-r--r--gamemode/shared/prayersystem/prayers/notdarkrp.lua21
1 files changed, 10 insertions, 11 deletions
diff --git a/gamemode/shared/prayersystem/prayers/notdarkrp.lua b/gamemode/shared/prayersystem/prayers/notdarkrp.lua
index e62064c..7820351 100644
--- a/gamemode/shared/prayersystem/prayers/notdarkrp.lua
+++ b/gamemode/shared/prayersystem/prayers/notdarkrp.lua
@@ -11,19 +11,18 @@ prayer.Tooltip = "Hello, and welcome to Artery, Enjoy your stay"
--Optional, when the player clicks this item, a menu will show up, if the menu item is clicked, the function is ran. This is all run client side, so if you want it to do something server side, you'll need to use the net library. Remember that items are in the shared domain, so you can define what it does in the same file!
-if CLIENT then
- local lastpray = CurTime()
+local lastpray = CurTime()
- function prayer.Pray(self)
- if CurTime() > lastpray + 5 then
- local helppanel = vgui.Create("DFrame")
- helppanel:SetSize(ScrW()/3,ScrH())
- helppanel:Center()
- helppanel:MakePopup()
- helppanel:SetText("Help")
+function prayer.Pray(self)
+ if SERVER then return end
+ if CurTime() > lastpray + 5 then
+ local helppanel = vgui.Create("DFrame")
+ helppanel:SetSize(ScrW()/3,ScrH())
+ helppanel:Center()
+ helppanel:MakePopup()
+ helppanel:SetText("Help")
- lastpray = CurTime()
- end
+ lastpray = CurTime()
end
end