orangetom1 Posted November 17, 2009 Share Posted November 17, 2009 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
50p Posted November 17, 2009 Share Posted November 17, 2009 Use [ lua][ /lua] (no spaces) for code! EXAMPLE getPlayerName Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now