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