Jump to content

Help with changing homesystem marker


SuperSkunk

Recommended Posts

Hey guys,

Today I was playing around with a homesystem and I was wondering if it was possible to change the house markers (Corona) ingame into somthing more attractive like the little green house icon for "for sale" and the red house for "sold" (property_fsale , property_locked)

Now I am new to scripting and was wondering if anyone would tell me if this was possible. I found this line in the server.lua, is this the line I should change?

  

local marker = createMarker (tonumber(x),tonumber(y),tonumber(z),"corona",1,255,0,0,getRootElement())

        setElementData (marker,"housenumber",tonumber(number))

      else

        local marker = createMarker (tonumber(x),tonumber(y),tonumber(z),"corona",1,0,255,0,getRootElement())

        setElementData (marker,"housenumber",tonumber(number))

Or what are the different types of markers ? cylinder,corona..

Link to comment

That would be it. However i recommend putting your code in


HERE

so you don't get chewed out :P

However the little house icons are blips not markers from my knowledge

Are you saying you want it on the minimap? If so look for a blip section in the code and check out the blip ID's on the wiki. Other than that, If you want the marker (the corona) to be that icon instead I think someone else would have to help you with that

Link to comment

https://wiki.multitheftauto.com/wiki/CreateMarker

"checkpoint": A race checkpoint. These are very tall, but not infinite, light pillars. Checkpoints snap to ground and become invisible after going over a certain Z height.

"ring": Doughnut shaped ring, normally used for aircraft.

"cylinder": Small glowing ground ring. These are the glow markers you walk into to activate missions or events in single player.

"arrow": Arrow pointing down. These are the arrows on the doors you can enter in single player, except MTA's are not animated by default.

"corona": A glowing ball of light.

- Quote from MTA Wiki.

So there are 5 types of marker.

Link to comment

local marker = createMarker (tonumber(x),tonumber(y),tonumber(z),"corona",1,255,0,0,getRootElement()) 

        setElementData (marker,"housenumber",tonumber(number))

      else

        local marker = createMarker (tonumber(x),tonumber(y),tonumber(z),"corona",1,0,255,0,getRootElement())

        setElementData (marker,"housenumber",tonumber(number))

      end

      outputDebugString ("House " .. tostring(number) .. " loaded!")

    end

Is there anyway I could change createMarker to createPickup and have the script spawn House icons instead of corona''s?

Link to comment
       local pickup = createPickup (tonumber(x),tonumber(y),tonumber(z),3,1272,100) 
        setElementData (pickup,"housenumber",tonumber(number)) 
      else 
        local pickup = createPickup (tonumber(x),tonumber(y),tonumber(z),3,1273,100) 
        setElementData (pickup,"housenumber",tonumber(number)) 
      end 
      outputDebugString ("House " .. tostring(number) .. " loaded!") 
    end 

but remember! you must change events onMarkerHit to onPickupUse

Link to comment

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