Jump to content

Gawdzik

Members
  • Posts

    4
  • Joined

  • Last visited

Gawdzik's Achievements

Vic

Vic (3/54)

0

Reputation

  1. Yes! That's it! Thank you very much for help. Now I'm reading about gsub in Lua DOC. Thanks. Have a nice day.
  2. Okey... but, you don't understand me. I know that, I post only a piece of my code. Read the first topic what I want to do. Thanks for help, but it's not that
  3. Thanks for reply, but don't have idea how to do that. Maybe function to edit a var message? And create if last char == . then outputchatbox, else message == ... says: " .. message .. "."
  4. Hello, I'm totally newbie, and I'm learning LUA with making Role Play server. For the first, sorry for my bad English, please, be forgiving. I have got a local chat, for the aesthetics I want to manipulate chars in var. Example, player press t (open chat) and write -> "hello, I'm new in the town", when he press enter in the chatbox there is a "Hello, I'm, new in the town." (capital letter and dot in the end). I hope you understand my request. I don't want ready script (if you want...), I look forward to tips. My localchat function... function sendMessageToNearbyPlayers( message, messageType ) if messageType == 0 then local posX, posY, posZ = getElementPosition( source ) local chatSphere = createColSphere( posX, posY, posZ, chatRadius ) local nearbyPlayers = getElementsWithinColShape( chatSphere, "player" ) destroyElement( chatSphere ) local gracz = getPlayerName (source) local dlugosc = #message for index, nearbyPlayer in ipairs( nearbyPlayers ) do if dlugosc <= 8 then outputChatBox( "#99b7d0" .. gracz .. " mówi: #c8e6ff" .. message .. "", nearbyPlayer,255,255,255,true ) setPedAnimation( source, "ped", "IDLE_chat", #message*70, false, false, false, false) else outputChatBox( "#99b7d0" .. gracz .. " mówi: #c8e6ff" .. message .. "", nearbyPlayer,255,255,255,true ) setPedAnimation( source, "ped", "IDLE_chat", #message*35, false, false, false, false) end end end end
×
×
  • Create New...