Jump to content

Position name


-Doc-

Recommended Posts

Posted

Hey :) . I have a question how it's possible to change location name for example mount chiliad to mout himalaya ?

My scripting skills

 


76561198189590622.pngAddFriend.png

  • MTA Team
Posted

First disable showing default zone names.

showPlayerHudComponent("area_name",false) 

Then use:

getZoneName 

In adition to a table like this:

local customNames = { 
['Los Santos'] = "Custom Name", 
['San Fierro'] = "Custom Name" 
} 

Then just use a loop like:

local zone = getZoneName(...) 
for index, value in pairs(customNames)do 
if index == zone then 
dxDrawText(value,...) 
end 
end 

Or simply:

local zone = getZoneName(...) 
local cus = customNames[zone] 
dxDrawText(cus,...) 

PS: Made it in the mobile, there could be some mistake.

DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp

 
Posted
First disable showing default zone names.
showPlayerHudComponent("area_name",false) 

Then use:

getZoneName 

In adition to a table like this:

local customNames = { 
['Los Santos'] = "Custom Name", 
['San Fierro'] = "Custom Name" 
} 

Then just use a loop like:

local zone = getZoneName(...) 
for index, value in pairs(customNames)do 
if index == zone then 
dxDrawText(value,...) 
end 
end 

Or simply:

local zone = getZoneName(...) 
local cus = customNames[zone] 
dxDrawText(cus,...) 

PS: Made it in the mobile, there could be some mistake.

and he can edit getZoneName function so it will be more easier than do "if zonename == zone then" everytime

local customNames = { 
['Los Santos'] = "Custom Name", 
['San Fierro'] = "Custom Name" 
} 
  
function getZoneName(x,y,z,citiesonly) 
    if type(x) == "number" and type(y) == "number" and type(z) == "number" then 
    return customNames[getZoneName(x,y,z,citiesonly or false)] or getZoneName(x,y,z,citiesonly or false) 
    end 
end 

Posted

where I think all the names of the areas?

local customNames = { 
['Los Santos'] = "Custom Name", 
['San Fierro'] = "Custom Name" 
['name?'] = "Custom Name" 
['name?'] = "Custom Name" 
['name?'] = "Custom Name" 
['name?'] = "Custom Name" 
} 

 DUyJ810.gif

Posted
where I think all the names of the areas?
local customNames = { 
['Los Santos'] = "Custom Name", 
['San Fierro'] = "Custom Name" 
['name?'] = "Custom Name" 
['name?'] = "Custom Name" 
['name?'] = "Custom Name" 
['name?'] = "Custom Name" 
} 

AkSHYpg.png

Posted

That person can't script, dude, he just can copy paste script here and expects us to fix his problem, so basically he needs a full edited working code.

"Get busy living or get busy dying"

Posted
That person can't script, dude, he just can copy paste script here and expects us to fix his problem, so basically he needs a full edited working code.

i can't script?

My scripting skills

 


76561198189590622.pngAddFriend.png

Posted
That person can't script, dude, he just can copy paste script here and expects us to fix his problem, so basically he needs a full edited working code.

i can't script?

I wrote what I think. Btw, good luck in cloning Grafuroam.

"Get busy living or get busy dying"

Posted
I have my unique scripts so shutup. :twisted:

"unique"? God damn. No Dm mode is actually Chaos MTA Freeroam's No Dm mode, which you are using. Your freeroam panel, hud and all other shit is copied from Grafuroam. I guess, how that makes you unique? :roll:

"Get busy living or get busy dying"

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