Gondolom Zero modot használsz.
Szerver oldal:
function factionOOC(thePlayer, commandName, ...)
local logged = getElementData(thePlayer, \"loggedin\")
if (logged==1) then
if not (...) then
outputChatBox(\"Használd: /\" .. commandName .. \" [üzenet]\", thePlayer, 255, 194, 14)
else
local theTeam = getPlayerTeam(thePlayer)
local theTeamName = getTeamName(theTeam)
local playerName = getPlayerName(thePlayer)
local playerFaction = getElementData(thePlayer, \"faction\")
if not(theTeam) or (theTeamName==\"Citizen\") then
outputChatBox(\"Nem vagy frakcióban.\", thePlayer)
else
local message = table.concat({...}, \" \")
if (togState[playerFaction]) == true then
return
end
for index, arrayPlayer in ipairs( getElementsByType( \"player\" ) ) do
if isElement( arrayPlayer ) then
if getElementData( arrayPlayer, \"bigearsfaction\" ) == theTeam then
outputChatBox(\"((\" .. theTeamName .. \")) \" .. playerName .. \": \" .. message, arrayPlayer, 3, 157, 157)
elseif getPlayerTeam( arrayPlayer ) == theTeam and getElementData(thePlayer, \"loggedin\") == 1 then
outputChatBox(\"((OOC Frakció Chat)) \" .. playerName .. \": \" .. message, arrayPlayer, 3, 237, 237)
end
end
end
end
end
end
end
addCommandHandler(\"f\", factionOOC, false, false)