Jump to content

How to change items name in skin list


dam034

Recommended Posts

Posted

Hi,

I have the skin list in the client's GUI, I want to change some names in that list, e.g. Duplicates > New, OG Loc > Spongebob.

How can I do?

Thanks

dam034

I'm developing a revolution for MTASA

Posted

You're talking about the freeroam skin list? if so, then you can go to the freeroam resource and open "skins.xml" and change it there.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Thamks for this, but I want also to rename some vehicles, both in the GUI list and in the speedometer?

How can I change those in the speedometer?

Thanks

dam034

I'm developing a revolution for MTASA

Posted

Well, that's a different thing, you'll have to edit the script for that.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Find wherever it gets the vehicle name, and if the name is X, then change it to Y.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

I don't know which speedometer you're using, if you post the script, I can tell you.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

It is downloaded from a website, and I have modified something.

meta.xml

 <meta> 
    <info author="Damiano M" version ="1.1.1" type ="misc" description="Contachilometri con km/h, mph, nome e salute del veicolo" /> 
    <script src="speedo.lua" type="client" /> 
    <file src="carattere.ttf" /> 
 </meta> 

speedo.lua

spfont = dxCreateFont("carattere.ttf", 15) 
  
function conta() 
    if isPedInVehicle(localPlayer) == false then 
        return 
    end 
    sx, sy, sz = getElementVelocity (getPedOccupiedVehicle(localPlayer)) 
    kmhs = math.floor(((sx^2 + sy^2 + sz^2)^(0.5))*180) 
    mphs = math.floor((((sx^2 + sy^2 + sz^2)^(0.5))*180)/1.6) 
    health = getElementHealth (getPedOccupiedVehicle(localPlayer)) 
    name = getVehicleName (getPedOccupiedVehicle(localPlayer)) 
    currenthealth = math.floor(health/10) 
    screenWidth, screenHeight = guiGetScreenSize() 
    windowWidth, windowHeight = 300, 170 
    left = screenWidth/1.15 - windowWidth/4.5 
    top = screenHeight/1.15 - windowHeight/20 
    px, py, pz = getElementPosition(localPlayer) 
    posizione = getZoneName(px, py, pz, false) 
    dxDrawText ( " "..posizione, left ,  top -123, screenWidth +2, screenHeight , tocolor ( 0, 0, 0, 255 ), 1, spfont ) 
    dxDrawText ( " #FF8040"..posizione, left -2,  top-125, screenWidth, screenHeight -2, tocolor ( 0, 255, 255, 255 ), 1, spfont, "left", "top", false, false, false, true ) 
    dxDrawText ( " "..tostring(name).." ", left ,  top -93, screenWidth +2, screenHeight , tocolor ( 0, 0, 0, 255 ), 1, spfont ) 
    dxDrawText ( " "..tostring(name).." ", left -2,  top -95, screenWidth, screenHeight -2, tocolor ( 0, 255, 0, 255 ), 1, spfont ) 
    dxDrawText ( " "..tostring(currenthealth).."%", left ,  top -63, screenWidth +2, screenHeight , tocolor ( 0, 0, 0, 255 ), 1, spfont ) 
    dxDrawText ( " "..tostring(currenthealth).."#00FF00%", left -2,  top -65, screenWidth, screenHeight -2, tocolor ( 255, 12, 0, 255 ), 1, spfont, "left", "top", false, false, false, true  ) 
    dxDrawText ( " ___________________", left -2,  top -62, screenWidth, screenHeight -2, tocolor ( 255, 0, 0, 255 ), 1, spfont ) 
    dxDrawText ( " ___________________", left -2,  top -60, screenWidth, screenHeight -2, tocolor ( 0, 0, 0, 255 ), 1, spfont ) 
    dxDrawText ( " "..tostring(kmhs).."km/h", left ,  top -23, screenWidth +2, screenHeight , tocolor ( 0, 0, 0, 255 ), 1, spfont ) 
    dxDrawText ( " "..tostring(kmhs).."#00FF00km/h", left -2,  top -25, screenWidth, screenHeight -2, tocolor ( 0, 255, 255, 255 ), 1, spfont, "left", "top", false, false, false, true ) 
    dxDrawText ( " "..tostring(mphs).."mph", left ,  top +2, screenWidth +2, screenHeight , tocolor ( 0, 0, 0, 255 ), 1, spfont ) 
    dxDrawText ( " "..tostring(mphs).."#00FF00mph", left -2,  top, screenWidth, screenHeight -2, tocolor ( 0, 255, 255, 255 ), 1, spfont, "left", "top", false, false, false, true ) 
end 
  
addEventHandler("onClientRender", root, conta) 

And there is the file carattere.ttf, which is the font file.

The name of the vehicle is taken by getVehicleName(), I want to change this in the script of MTA.

Thanks

dam034

I'm developing a revolution for MTASA

Posted

You can do this:

-- global:

local names = 
    { 
        [ "Infernus" ] = "Lamborghini", 
        [ "Bullet" ] = "Ford GT", 
    } 

name = getVehicleName (getPedOccupiedVehicle(localPlayer)) 
local name = ( names [ name ] and names [ name ] or name ) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Use:

showPlayerHudComponent 

the component name is: "area_name".

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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