Jump to content

[RP] Chatbox


Namorek

Recommended Posts

i think i get it!

addEventHandler("onPlayerChat",getRootElement(), 
function(msg, msgtype) 
    if (msgtype == 1) then 
    outputChatBox("#00FF00* " .. string.gsub(getPlayerName(source), "#%x%x%x%x%x%x", "") .. " " .. string.gsub(msg, "#%x%x%x%x%x%x", ""), getRootElement(), 255, 255, 255, true) 
    else 
    outputChatBox(getPlayerName(source) .. " says ".. msg, getRootElement(), 255, 255, 255, true) 
    end 
    cancelEvent() 
end) 

Link to comment
addEventHandler("onPlayerChat",getRootElement(), 
function(msg, msgtype) 
    if (msgtype == 1) then 
    cancelEvent() 
    outputChatBox("#00FF00* " .. string.gsub(getPlayerName(source), "#%x%x%x%x%x%x", "") .. " " .. string.gsub(msg, "#%x%x%x%x%x%x", ""), getRootElement(), 255, 255, 255, true) 
    else 
    cancelEvent() 
    outputChatBox(getPlayerName(source) .. " says ".. msg, getRootElement(), 255, 255, 255, true) 
   end 
end) 

try that (i'm not sure what i'm doing, didn't sleep yet)

Link to comment
addEventHandler("onPlayerChat",getRootElement(), 
function(msg, msgtype) 
    if (msgtype == 1) then 
    cancelEvent() 
    outputChatBox("#00FF00* " .. string.gsub(getPlayerName(source), "#%x%x%x%x%x%x", "") .. " " .. string.gsub(msg, "#%x%x%x%x%x%x", ""), getRootElement(), 255, 255, 255, true) 
    else 
    cancelEvent() 
    outputChatBox(getPlayerName(source) .. " says ".. msg, getRootElement(), 255, 255, 255, true) 
   end 
end) 

try that (i'm not sure what i'm doing, didn't sleep yet)

Thanks you i remove freeroam is work say :D

Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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