Jump to content

Help with changing homesystem marker


SuperSkunk

Recommended Posts

Posted

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

Posted

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

Posted

At the moment I have the corona as the marker but want to change it to the house icon , no not on the mini map but when you go to buy the house you walk into the marker ( corona ) and buy/sell.

what other kinds of markers are there? I mean appart from corona,

Posted

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.

Posted

Im not sure if it's possible but you can modify the 3D Model (with 3D Studio Max or any similiar) of a certain marker type.

Never did it so don't take my word.

Posted

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?

Posted
       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

Posted

Thanks a lot mate that worked great but one problem , when I walk into the house icon to buy the house the icon is green ( forsale) but when I buy the house the icon stays green and doesn't go blue?

Posted

well, i just gave you how to change maker to pickup you must add something else to change the pickup type when buy the house, if you post the code when you buy and sell the house i do it.

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