Jump to content

orangetom1

Members
  • Posts

    5
  • Joined

  • Last visited

orangetom1's Achievements

Vic

Vic (3/54)

0

Reputation

  1. i need to put a colour for example when i say something it would be in red this is the script so far: 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 ) function onChat ( message, messageType ) if messageType == 0 then local root = getRootElement() outputChatBox ( getPlayerName ( source ) .. .. message, getRootElement(), true ) cancelEvent() end end addEventHandler ( "onPlayerChat", getRootElement(), onChat )See Also
  2. 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 )
  3. thank you all that i wanted was a bit of guidance thank you =]
  4. i need to some help on how to make it so their is a certain distance in which you can hear someone but if you go outside that distance i can no longer hear them. EG so i can't hear someone talking to the police when i am on a different island. Thank you would be gratefull for any help
  5. Hi i would like some advice on how to script chat distance in which you can see what people can chat
×
×
  • Create New...