Jump to content

what is ?


Best-Killer

Recommended Posts

Hello All 

What is the problem pls ? 0 errors 

addEvent("clanSystem:acceptInvite",true)
addEventHandler("clanSystem:acceptInvite",root,
function (thePlayer, clanName)
	local bool, theClan, inviter = isPlayerInvited(thePlayer)
		if bool then
		if clanName == theClan then
		    exports["SAEGMessages"]:sendClientMessage("teest"..tostring(clanName).."",client,255,0,0)
			setElementData(thePlayer,"clan",tostring(clanName))
			triggerEvent("onPlayerJoinClan",thePlayer,thePlayer,clanName)
			addMemberToClan(clanName, getAccountName(getPlayerAccount(thePlayer)), "Member", inviter)
			exports["SAEGMessages"]:sendClientMessage("Clan system: Welcome to ".. tostring(clanName) .."!",thePlayer,0,255,0)
			for index, player in pairs(getPlayersByClan(clanName)) do
				exports["SAEGMessages"]:sendClientMessage("Clan system: ".. getPlayerName(thePlayer) .." has joined the clan!",player,0,255,0)
			end
			players_invited[thePlayer] = false
		end
	end
end)
elseif (source == gui_elment["accept_invite"]) then
	local clanName = guiGridListGetItemText(gui_elment["create_clan"]["types_invites_grid"], guiGridListGetSelectedItem(gui_elment["create_clan"]["types_invites_grid"]), 1)
	if (not clanName) then return end
	triggerServerEvent("clanSystem:acceptInvite", client, tostring(clanName))
	guiGridListRemoveRow(gui_elment["types_invites_grid"], guiGridListGetSelectedItem(gui_elment["types_invites_grid"]))

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...