Jump to content

Help please


orangetom1

Recommended Posts

i have done the chat distance and i now have a problem were i can type in but nicknames do not show up does anyone know any help for this

local chatRadius = 25 --units
 
function sendMessageToNearbyPlayers( message, messageType )
if messageType == 1 then
local posX, posY, posZ = getElementPosition( source )
 
local chatSphere = createColSphere( posX, posY, posZ, chatRadius )
local nearbyPlayers = getElementsWithinColShape( chatSphere, "player" )
destroyElement( chatSphere )
 
for index, nearbyPlayer in ipairs( nearbyPlayers ) do
outputChatBox( message, nearbyPlayer )
end
end
end
addEventHandler( "onPlayerChat", getRootElement(), sendMessageToNearbyPlayers )
 
function blockChatMessage()
cancelEvent()
end
addEventHandler( "onPlayerChat", getRootElement(), blockChatMessage )

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...