Jump to content

[HELP] Blip for every marker


PartyMTA

Recommended Posts

Posted

Hello, i tried to make a little script to make a blip for every single marker in the world and attach it. But it doesn't make any blip. Can someone help me?

  
function getMarker() 
    for k,marker in ipairs(getElementsByType("marker")) do 
        local r,g,b,a = getMarkerColor(marker) 
        createBlipAttachedTo(marker,0,2,r,g,b,a,0,99999) 
    end 
end 
addEventHandler("onClientResourceStart",getRootElement(),getMarker) 
  

Note: i never used the for loops. So sorry if this makes no sense

560x95_FFFFFF_FF9900_000000_000000.png

560x95_FFFFFF_FF9900_000000_000000.png

Posted

Did you set the script as client side in the meta.xml? do you get any error in the debugscript?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

"onClientResourceStart" is a client-side event, if you want to do it server side change it to "onResourceStart".

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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