Hey,
ich wollte einen Chatradius erstellen, aber das geht irgendwie nicht..
Was ist falsch an dem Code?
Lua
function onPlayerChatting( message, m_type )
if(m_type == 1)
local x, y, z = getElementPosition(source)
local radius = createColSphere(x,y,z)
local pID = getElementsWithinColShape(radius,"player")
for index, spieler in ipairs ( pID ) do
outputChatBox(getPlayerName(source).."#FEFEFE:"..message..,index,0,0,0,true)
end
end
end
addEventHandler("onPlayerChat",getRootElement(),onPlayerChatting)
Alles anzeigen