function icchat(message, msgType)
if msgType == 0 then
cancelEvent()
local x, y, z = getElementPosition(source)
local playername = getPlayerName(source)
playername = string.gsub(playername, "_", " ")
message = string.gsub(message, "#%x%x%x%x%x%x", "")
local dimension = getElementDimension(source)
local interior = getElementInterior(source)
for k, gracze in ipairs(getElementsByType("player")) do
if getDistanceBetweenPoints3D(x, y, z, getElementPosition(gracze)) < 20 then
local graczeDim = getElementDimension(gracze)
local graczeInt = getElementInterior(gracze)
if (graczeDim==dimension) and (graczeInt==interior) then
outputChatBox("#EEEEEE" .. playername .. " m?wi: " .. message, gracze, 255, 255, 255, true)
end
end
end
end
end
addEventHandler("onPlayerChat", getRootElement(), icchat)
Nie możesz pisać nowych tematów Nie możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz głosować w ankietach