Jump to content

Dxdraw EdIT Location names


yoya99

Recommended Posts

Posted

Hey there i wanted to ask ....is there any way to edit the location names of the san andreas map in the hud??

thx in advance

And the snail starts to sing

Posted
  
local newAreas = { 
{"Area_Name1", 500, 500, 500, 100, 50}, 
{"Area_Name2", 900, 900, 900, 900, 100, 50} 
-- Area Name, posX, posY, posZ, posWidth, posHeight 
} 
function disableGTAZones() 
setPlayerHudComponentVisible(source, "area_name", false) 
outputChatBox("This server uses custom GTA SA Zones.", source) 
end 
addEventHandler("onPlayerJoin", root, disableGTAZones) 
  
function createNewZones() 
for i, v in ipairs(newAreas) do 
local colZone = createColRectangle(newAreas[v][2], newAreas[v][3], newAreas[v][4], newAreas[v][5], newAreas[v][6]) 
setElementData(colZone, "zone_name", newAreas[v][1]) 
end 
end 
addEventHandler("onResourceStart", resourceRoot, createNewZones) 
  
function printNewZoneName(theZone) 
if getElementType(source) == "player" then 
outputChatBox(getElementData(theZone, "zone_name").." zone entered!", source, 255, 0, 0) 
end 
end 
addEventHandler("onColShapeHit", resourceRoot, printNewZoneName) 
  

I can alternatively sell you a resource which does just this, based on XML, allowing you to create zones by taking 4 points on the map (easier to create). You can also set zone names and add other properties such as entry restriction etc. Anyway, the script I wrote above should do the job.

Contact me if you are looking for a Web Developer.

3rd of October 2014 - Founder of RomaniaZ

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