Sehr geehrte Community,
ich hab ein kleines Script vom Mta Wiki genommen und eingefügt!
Jetzt habe ich einmal den Chat den ich eingefügt habe und den Standart Chat. Wie mache ich den Standart Chat weg ??
Lua
local chatRadius = 20
function sendMessageToNearbyPlayers( message, messageType )
local r = 255
local g = 255
local b = 255
if messageType == 0 then
local posX, posY, posZ = getElementPosition( source )
local chatSphere = createColSphere( posX, posY, posZ, chatRadius )
local nearbyPlayers = getElementsWithinColShape( chatSphere, "player" )
destroyElement( chatSphere )
cancelEvent ()
for index, nearbyPlayer in ipairs( nearbyPlayers ) do
outputChatBox( "#AEFF98"..getPlayerName ( source ).. ": " ..message, nearbyPlayer, r ,g ,b, true )
end
end
end
addEventHandler( "onPlayerChat", getRootElement(), sendMessageToNearbyPlayers )
Alles anzeigen
Ich bedanke mich im Voraus
Mit freundlichen Grüßen
Samora