Jump to content

Help with Blips


FuriouZ

Recommended Posts

Hey guys!

I have problem,that i cant add blip visible distance

What is wrong here ?

function addNewblip(source,command,type) 
    local accName = getAccountName( getPlayerAccount(source) ) 
    if isObjectInACLGroup( "user."..accName, aclGetGroup("Server Owner") ) then 
        if (type) then 
            local x,y,z = getElementPosition(source) 
            local file = xmlLoadFile("blipMap.map") 
            local blip = xmlCreateChild(file,"blip") 
            local blip = getElementsByType("blip") 
            local distance = 50          
            for index, blip in ipairs(blips) do 
                distance = distance + getBlipVisibleDistance(blip) or 0  
            end          
            xmlNodeSetAttribute(blip,"posX",x) 
            xmlNodeSetAttribute(blip,"posY",y) 
            xmlNodeSetAttribute(blip,"posZ",z) 
            xmlNodeSetAttribute(blip,"posZ",z)           
            xmlNodeSetAttribute(blip,"icon",type) 
            xmlSaveFile(file) 
            xmlUnloadFile(file) 
            createBlip (x,y,z, type) 
            setBlipVisibleDistance(blip, 500) 
            outputChatBox("[bLIP]Blip was added successfully.",source,200,200,0) 
        else 
            outPutChatBox("[bLIP]SYNTAX: /addBlip [type].",source,200,200,0) 
            outPutChatBox("[bLIP]The type id's are found here:",source,200,200,0) 
            outPutChatBox("[bLIP]The type id's are found here:",source,200,200,0) 
        end 
    end 
end 
  
  

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