Jump to content

Hex codes


krYshuT

Recommended Posts

Posted

Is there any way to hide hex codes in player's names?

Nobody want it look like this:

beznzvu0.jpg

But what is odd - when you finish the race, the killmessages resource shows it without the hex code as "ESE|krYshuT". However, when i kill myself it shows as "ESE|#ff00ffkrYshuT

Posted

you will have to edit every resource that is displaying it "wrong"

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted

Well, there is this line in delay indicator resource:

delayDisplayBehind:text("+"..msToTimeStr(delayTime).." "..cps..getPlayerName(source))

I have no experience in coding, so I don't know how to make it work fine. I tried to edit it like:

delayDisplayBehind:text("+"..msToTimeStr(delayTime).." "..cps..string.gsub(playerName, '#%x%x%x%x%x%x', ''))

But it didn't work.

How it's correct?

Else in the killmessages resource I have no idea where to paste it to make it work. Can you help me with this?

Posted
  
delayDisplayBehind:text("+"..msToTimeStr(delayTime).." "..cps..string.gsub(getPlayerName(source), '#%x%x%x%x%x%x', '')) 
  

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted

Works perfect, thanks much.

Just one more question. Is there a way to make color text else then in the chatbox? I've got one resources which generates text elsewhere.

Posted

depends of the way the text is displayed.

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted

Ingame it looks like this:

beznzvuck.png

Lua file:

local messagesList = { 
    "19.11.: ESE #00ff0013:3 TPT", 
    "ingame cycling text shows here", 
    "ingame cycling text shows here", 
    "ingame cycling text shows here", 
    "ingame cycling text shows here", 
    "ingame cycling text shows here", 
  
} 
local currentMessage = 0 
  
addEventHandler("onClientPreRender", getRootElement(), 
    function() 
        local screenWidth, screenHeight = guiGetScreenSize() 
  
        -- Draw the news sticker. 
        dxDrawRectangle(screenWidth - 249, 4, 0, 20, tocolor(0, 0, 0, 192), false) 
         
        -- Draw all strings. 
        dxDrawText(messagesList[currentMessage + 1], screenWidth - 246, 6, screenWidth - 6, 16, tocolor(255, 255, 255, 255), 1, "default-bold", "center", "top", false, false, false) 
    end 
) 
  
function updateMessage() 
    if (currentMessage == 5) then 
        currentMessage = 0 
    else 
        currentMessage = currentMessage + 1 
    end 
end 
setTimer(updateMessage, 5000, 0) 

Posted

take a look here.

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted

your welcome, it's nice of you that you actually tried :)

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

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...