dam034 Posted September 4, 2013 Posted September 4, 2013 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
Castillo Posted September 4, 2013 Posted September 4, 2013 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.
dam034 Posted September 5, 2013 Author Posted September 5, 2013 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
Castillo Posted September 5, 2013 Posted September 5, 2013 Well, that's a different thing, you'll have to edit the script for that.
Castillo Posted September 6, 2013 Posted September 6, 2013 Find wherever it gets the vehicle name, and if the name is X, then change it to Y.
dam034 Posted September 7, 2013 Author Posted September 7, 2013 Yes, but where can I find the vehicle name to change it? Thanks
Castillo Posted September 7, 2013 Posted September 7, 2013 I don't know which speedometer you're using, if you post the script, I can tell you.
dam034 Posted September 7, 2013 Author Posted September 7, 2013 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
Castillo Posted September 7, 2013 Posted September 7, 2013 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 )
dam034 Posted September 8, 2013 Author Posted September 8, 2013 Thanks Solidsnake14, it works Another thing: I want to remove the name of zone showed in Old English Text MT font when I enter a new zone of the game. In the linked screen I have drawn a red circle on it. Link: http://img707.imageshack.us/img707/9398/9t4.png How can I remove it? Thanks
Castillo Posted September 8, 2013 Posted September 8, 2013 Use: showPlayerHudComponent the component name is: "area_name".
dam034 Posted September 8, 2013 Author Posted September 8, 2013 Thanks Solidsnake14, you are a very expert of MTA
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now