K4stic Posted July 11, 2013 Share Posted July 11, 2013 for ID in pairs(blips) do local x, y, z = blips[ID][1], blips[ID][2], blips[ID][3] if blips[1] and blips[2] and blips[3] and blips[4] and blips[5] and blips[6] and blips[7] and blips[8] and blips[9] and blips[10] and blips[11] and blips[12] then local blipizza = createBlip ( x, y, z, 29, 0.5, 0 ,0, 0, 0, 0, 400 ) setBlipSize ( blipizza, 0.5 ) end if blips[13] and blips[14] and blips[15] and blips[16] and blips[17] and blips[18] and blips[19] and blips[20] and blips[21] and blips[22] and blips[23] and blips[24] then local blipcluckinbell = createBlip ( x, y, z, 14, 0.5, 0 ,0, 0, 0, 0, 400 ) setBlipSize ( blipcluckinbell, 0.5 ) end if blips[25] and blips[26] and blips[27] and blips[28] and blips[29] and blips[30] and blips[31] and blips[32] and blips[33] and blips[34] then local blipburgershot = createBlip ( x, y, z, 10, 0.5, 0 ,0, 0, 0, 0, 400 ) setBlipSize ( blipburgershot, 0.5 ) end end The Prob is that is making all blip id same how solve it? ( it make all blips id 10 = BurgerShot Blip ) Link to comment
Moderators IIYAMA Posted July 11, 2013 Moderators Share Posted July 11, 2013 You mean something like this? for index,blip in pairs(blips) do local x, y, z = blip[1], blip[2], blip[3] if index <= 12 then local blipizza = createBlip ( x, y, z, 29, 0.5, 0 ,0, 0, 0, 0, 400 ) setBlipSize ( blipizza, 0.5 ) elseif index <= 24 then local blipcluckinbell = createBlip ( x, y, z, 14, 0.5, 0 ,0, 0, 0, 0, 400 ) setBlipSize ( blipcluckinbell, 0.5 ) elseif index <= 34 then local blipburgershot = createBlip ( x, y, z, 10, 0.5, 0 ,0, 0, 0, 0, 400 ) setBlipSize ( blipburgershot, 0.5 ) end end Link to comment
ixjf Posted July 11, 2013 Share Posted July 11, 2013 You mean something like this? for index,blip in pairs(blips) do local x, y, z = blip[1], blip[2], blip[3] if index <= 12 then local blipizza = createBlip ( x, y, z, 29, 0.5, 0 ,0, 0, 0, 0, 400 ) setBlipSize ( blipizza, 0.5 ) elseif index <= 24 then local blipcluckinbell = createBlip ( x, y, z, 14, 0.5, 0 ,0, 0, 0, 0, 400 ) setBlipSize ( blipcluckinbell, 0.5 ) elseif index <= 34 then local blipburgershot = createBlip ( x, y, z, 10, 0.5, 0 ,0, 0, 0, 0, 400 ) setBlipSize ( blipburgershot, 0.5 ) end end if index <= 12 then if index >= 12 and index <= 24 then if index >= 24 and index <= 34 then Link to comment
Moderators IIYAMA Posted July 11, 2013 Moderators Share Posted July 11, 2013 no really required. The index counts up from 1 t/m amount of data. If the value is lower then 13 then only the first one will be triggered. etc. It is just logic of elseif.... that is saving your server power, btw now you have double blips: if index <= 12 then if index >= 12 and index <= 24 then if index >= 24 and index <= 34 then if index <= 12 then if index > 12 and index <= 24 then if index > 24 and index <= 34 then Link to comment
ixjf Posted July 11, 2013 Share Posted July 11, 2013 Nevermind, I took a quick look at the code and didn't see that it was an "elseif". 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