From 09de17b25912ca1ed79afcf9ecfc3291fe34a96d Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Mon, 24 Oct 2016 12:10:40 -0400 Subject: fixed prayers to work with the prayer system --- gamemode/shared/prayersystem/prayers/notdarkrp.lua | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'gamemode/shared/prayersystem/prayers/notdarkrp.lua') 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 -- cgit v1.2.3-70-g09d2