FuriouZ Posted February 5, 2013 Posted February 5, 2013 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 Homepage @ http://rageresources.blogspot.com/ Offical Facebook @ https://www.facebook.com/pages/Rage-Scr ... fref=photo
Castillo Posted February 5, 2013 Posted February 5, 2013 createBlip (x,y,z, type) setBlipVisibleDistance(blip, 500) You didn't define "blip". Also, it's "outputChatBox", not "outPutChatBox". San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
50p Posted February 5, 2013 Posted February 5, 2013 You define "blip" twice. Also, I suggest to check if player's account is not a guest account. - MTA Script Editor - Ask your scripting questions properly, please. - 50p's public resources - Meta.xml - what is it for? How is it possible LOL
FuriouZ Posted February 6, 2013 Author Posted February 6, 2013 You define "blip" twice. Also, I suggest to check if player's account is not a guest account. I'm isn't in guest account.But i didn't understand what is wrong here can you explain more or fix it ? Homepage @ http://rageresources.blogspot.com/ Offical Facebook @ https://www.facebook.com/pages/Rage-Scr ... fref=photo
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now