function onSay(cid, words, param, channel)
local time = 50 -- in seconds
local playerGuild = getPlayerGuildId(cid)
if exhaustion.check(cid, 6008) then
doPlayerSendCancel(cid, "You Must Wait "..exhaustion.get(cid, 6008).." to invite Again")
return true
end
if(playerGuild == 0) then
doPlayerSendCancel(cid, "Sorry, you're not in a guild.")
return true
end
if not getPlayerGuildRank(cid) == 3 then
doPlayerSendCancel(cid, "You Aren't A Leader")
return true
end
local players = getPlayersOnline()
local members = 0
for i, tid in ipairs(players) do
if(getPlayerGuildId(tid) == playerGuild and cid ~= tid) then
doPlayerInviteToParty(cid,tid)
doPlayerSetStorageValue(cid, 9002, 1)
doPlayerSendTextMessage(tid, 27, "You Have Been Invited to Party By Guild Master.Please Say !join "..getPlayerName(cid).."")
doPlayerSendTextMessage(cid, 27,members.." has Been Invited")
exhaustion.set(cid, 6008, time * 1000)
members = members + 1
end
end
return true
end