Too much wrong.
Server-side:
addEvent("clanMembers",true)
function clanMembers()
triggerClientEvent(source, "clanMembers", source, clanMembersFunc(source))
end
addEventHandler("clanMembers", getRootElement(), clanMembers)
function clanMembersFunc(source)
local rowdata = {}
local acc = getPlayerAccount(source)
local team = getAccountData(acc, "team")
local inumber = 0
for i, v in pairs(getAccounts()) do
if (getAccountData(v, "team") == team) then
inumber = inumber + 1
rowdata[inumber] =
{
account = getAccountData(v,"nick") or getAccountName(v),
status = getAccountData(v, "teamstatus"),
team = getAccountData(v, "team")
}
end
end
if (inumber ~= 0) then
return rowdata
end
end
Not tested yet. Next time, tell us your error in /debugscript 3