roaddog Posted July 28, 2014 Share Posted July 28, 2014 Hello guys, I had no idea, why if I the function executed, I got many messages show up in a row, Then what would i do to make it 1 message only. I need an information about it, because I got 2 scripts which have same issue. I hope you guys understand what Im trying to do. function callPetrolBlips (thePlayer) if getElementType(thePlayer) == "player" and (thePlayer) then gasStationsBlip[name] = createBlip(x,y,z,48,0,0,0,0,0,0,450); setTimer (destroyPetrolBlips, 60000, 1 ) outputChatBox("Streaming for gasstations, press F11!", thePlayer, 255, 100, 0, true) end end addCommandHandler("station", callPetrolBlips) function destroyPetrolBlips (thePlayer ) blips = getElementsByType("blip") for i, v in ipairs (blips) do blipIcon = getBlipIcon ( v ) if (blipIcon == 48) then destroyElement(v) outputChatBox("gasstations's blips have been removed, type /station !", thePlayer , 255, 100, 0, true, 5) end end end addCommandHandler("ok", destroyPetrolBlips) Thank you. Link to comment
Anubhav Posted July 29, 2014 Share Posted July 29, 2014 function callPetrolBlips (thePlayer) if getElementType(thePlayer) == "player" and (thePlayer) then gasStationsBlip[name] = createBlip(x,y,z,48,0,0,0,0,0,0,450); setTimer (destroyPetrolBlips, 60000, 1 ) outputChatBox("Streaming for gasstations, press F11!", thePlayer, 255, 100, 0, true) end end addCommandHandler("station", callPetrolBlips) function destroyPetrolBlips (thePlayer ) blips = getElementsByType("blip") for i, v in ipairs (blips) do blipIcon = getBlipIcon ( v ) if (blipIcon == 48) then destroyElement(v) end end outputChatBox("gasstations's blips have been removed, type /station !", thePlayer , 255, 100, 0, true, 5) end addCommandHandler("ok", destroyPetrolBlips) Link to comment
roaddog Posted July 29, 2014 Author Share Posted July 29, 2014 Still the same. this has been fixed. outputChatBox("gasstations's blips have been removed, type /station !", thePlayer , 255, 100, 0, true) end but this one still giving many messages outputChatBox("Streaming for gasstations, press F11!", thePlayer, 255, 100, 0, true) could you explain what was the problem? Link to comment
Max+ Posted July 29, 2014 Share Posted July 29, 2014 your problem is it flooding the chat 2 times ? Link to comment
roaddog Posted July 29, 2014 Author Share Posted July 29, 2014 your problem is it flooding the chat 2 times ? Yes Edit: Nvm, I fixed it by myself, thank you anyway. Link to comment
Max+ Posted July 29, 2014 Share Posted July 29, 2014 (edited) , Edited July 29, 2014 by Guest Link to comment
AboShanab Posted July 29, 2014 Share Posted July 29, 2014 Edit: Nvm, I fixed it by myself, thank you anyway. 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