Best-Killer Posted November 14, 2016 Share Posted November 14, 2016 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
Best-Killer Posted November 14, 2016 Author Share Posted November 14, 2016 nvm fixed just forget to add 2nd clinet Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now