ManeXi Posted June 9, 2015 Share Posted June 9, 2015 (edited) I tried to add a command to show/hide blips, didn't work cuz i'm noob, help me please function showBaseBlips () createBlip ( 1972.5458984375, -1113.5166015625, 25.628751754761, 59,2,0,0,0, 255,0, 99999) end addCommandHandler(baseblips, showBaseBlips, false, true) if anyone could tell me the way to fix it. Edited June 10, 2015 by Guest Link to comment
Castillo Posted June 9, 2015 Share Posted June 9, 2015 Put quotes around "baseblips". Also, this will only create a blip in these coords, it won't hide/show it. Link to comment
ManeXi Posted June 9, 2015 Author Share Posted June 9, 2015 Put quotes around "baseblips".Also, this will only create a blip in these coords, it won't hide/show it. and how to make them hide/show? Link to comment
Castillo Posted June 9, 2015 Share Posted June 9, 2015 You would need to define the blip, so you can later destroy it if it exists. Link to comment
HUNGRY:3 Posted June 10, 2015 Share Posted June 10, 2015 function baseblip(player) local bliper = getElementData(player,"bliper") or 0 if bliper == true then blip = createBlip ( 1972.5458984375, -1113.5166015625, 25.628751754761, 59,2,0,0,0, 255,0, 99999) outputChatBox ("blip added!", player,0,0,255) setElementData(player,"bliper",false) else if not getElementData(player,"bliper") == true then destroyElement(blip) outputChatBox ("blip removed!", player,0,0,255) setElementData(player,"bliper",true) end end end addCommandHandler("baseblips",baseblip) it get hide/show in the same command should work Link to comment
3B00DG4MER Posted June 10, 2015 Share Posted June 10, 2015 Why are u using element data while u can do this cuz blip is global defined function baseblip(player) if (not blip) then blip = createBlip ( 1972.5458984375, -1113.5166015625, 25.628751754761, 59,2,0,0,0, 255,0, 99999) else destroyElement(blip) end addCommandHandler("baseblips",baseblip) that's simple Link to comment
HUNGRY:3 Posted June 10, 2015 Share Posted June 10, 2015 Why are u using element data while u can do this cuz blip is global defined function baseblip(player) if (not blip) then blip = createBlip ( 1972.5458984375, -1113.5166015625, 25.628751754761, 59,2,0,0,0, 255,0, 99999) else destroyElement(blip) end addCommandHandler("baseblips",baseblip) that's simple what ever Link to comment
ManeXi Posted June 10, 2015 Author Share Posted June 10, 2015 Thanks for helping this can be locked. Link to comment
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