Witam, tym razem z czatem frakcyjnym kt?ry pr?buj? zrobi?.
[lua]
function message (thePlayer,cmd,...)
if not getPlayerAccount(thePlayer) then return end
local accName = getAccountName ( getPlayerAccount ( thePlayer ) )
if not accName then return end
local allArgs = {...}
local theMessage = table.concat(allArgs, " ")
if isObjectInACLGroup ("user."..accName, aclGetGroup("PSP") ) or isObjectInACLGroup ("user."..accName, aclGetGroup("SAPD") ) or isObjectInACLGroup ("user."..accName, aclGetGroup("SAMC") ) then
for k,v in ipairs (getElementsByType("player")) do
if getPlayerAccount(v) then
accName = getAccountName(getPlayerAccount(v))
if accName then
if isObjectInACLGroup ("user."..accName, aclGetGroup("PSP") ) or isObjectInACLGroup ("user."..accName, aclGetGroup("SAPD") ) or isObjectInACLGroup ("user."..accName, aclGetGroup("SAMC") ) then
outputChatBox("#ff0000"..getPlayerName(thePlayer).."#ffffff**#1D9DE6Frakcyjny:#ffffff**#49AC4C "..theMessage, v, 255,255,255, true)
end
end
end
end
end
addCommandHandler("u", message)
addEventHandler("onPlayerJoin",getRootElement(),
function ()
bindKey(source,"u&... |