So I have a function:
function org.InviteMember(org,ply,perms, args) if org != nil then if OG.CheckPermission(perms, "-i") then -- invite member local plyS = args if plyS == ply then OG.SendMessage(ply, "You cannot invite yourself!") return end if plyS:GetOrg() == nil then -- Send invite org.invites[plyS:UniqueID()] = "Received" OG.RefreshOrgData(plyS:GetOrg()) DarkRP.createQuestion("Would you like to join " .. ply:GetOrg():GetName() .. "! -Invited by " .. ply:Nick(), "memberinvite".. ply:UniqueID(), plyS, 30, QFunc, ply, plyS ) else OG.SendMessage(ply, "That player is already in an organisation!") -- Different org end else OG.SendMessage(ply, "You do not have the required permissions to invite a member!") -- doesnt have required perms end else OG.SendMessage(ply, "You are not in an organisation!") -- Not in an org end end
How would I go about making a cooldown for this because I found that you can spam this on someones screen and it’s really annoying. I was experimenting with CurTime() and I have no idea on how to use it. Please help.