WiBox Posted June 17, 2018 Share Posted June 17, 2018 function rPBFTM(player) if ( isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(player)), aclGetGroup ( "Admin" ) ) then for _,players in ipairs(getElementsByType("player")) do if ( getElementDimension (players) == 336 ) then for _,blip in ipairs (getElementsByType("blip")) do icon = getBlipIcon(blip) if ( icon == 0 ) then if ( getBlipVisibleDistance (blip) ~= 0) then outputChatBox("3", player, 255, 0, 255) setBlipVisibleDistance(blip, 0.1) else if (getBlipVisibleDistance(blip) == 0.1) then outputChatBox("4", player, 255, 255, 255) setBlipVisibleDistance(blip, 500) end end end end end end end end addCommandHandler("empb", rPBFTM) addEventHandler("onPlayerWasted", getRootElement(), function () for _,blip in ipairs (getElementsByType("blip")) do for _,players in ipairs(getElementsByType("player")) do if ( getElementDimension (players) == 336 ) then icon = getBlipIcon(blip) if ( icon == 0 ) then if ( getBlipVisibleDistance(blip) == 0 ) then setBlipVisibleDistance(blip, 500) end end end end end end ) addCommandHandler("emp", function (player) blip = getElementsByType("blip") d = getBlipVisibleDistance(blip) icon = getBlipIcon(blip) if ( icon == 0 ) then outputChatBox("visible distance is "..d,player, 255, 0, 255) end end) Hello, I need help in this script.. I wanted to remove players blip from the mini-map but it's not working.. Well not all of it, when I use ( /empb ) it remove the blip from the mini-map but when I reuse ( /empb ) it doesn't back the blip, I used ( /debugscript 3 ) but it just gaved me that " disableBlip.lua:57 bad argument #1 to ipairs (table expected, got boolean) ".. now for the "onPlayerWasted" working without any problems, but about (/emp) it didn't send a message, if someone can tell me what I did wrong, I'm using type="server" on meta.xml, and thanks. Link to comment
Moderators Patrick Posted June 17, 2018 Moderators Share Posted June 17, 2018 In line 43. the blip variable is not a blip element. getElementsByType is return a table with all blip element. Link to comment
Moderators Patrick Posted June 17, 2018 Moderators Share Posted June 17, 2018 (edited) 3 minutes ago, SSKE said: So how to fix it? Honestly, this script is sucks. Where did you create the player's blip? Edited June 17, 2018 by Patrick2562 Link to comment
WiBox Posted June 17, 2018 Author Share Posted June 17, 2018 I'm still a beginner at scripting, so if there a way you can at least fix or give me a way to make that script, I really would appreciate that. Link to comment
Moderators Patrick Posted June 17, 2018 Moderators Share Posted June 17, 2018 1 minute ago, SSKE said: I'm still a beginner at scripting, so if there a way you can at least fix or give me a way to make that script, I really would appreciate that. Maybe I can, but: "Where did you create the player's blip?" Link to comment
WiBox Posted June 17, 2018 Author Share Posted June 17, 2018 (edited) I didn't create it, it's already created on the mini-map, that blip ID 0, I want to remove it from mini-map and back it with same command that's all Edited June 17, 2018 by SSKE Link to comment
Moderators Patrick Posted June 17, 2018 Moderators Share Posted June 17, 2018 (edited) 2 minutes ago, SSKE said: I didn't create it, it's already created on the mini-map, that blip ID 0, I want to remove it from mini-map and back it with same command that's all Ohh, so.. Some resource is created blips. (example: play resource create player's blip.) And if I type the /empb command, all blips hide only for me or if I type the /empb command all blips hide for everyone? Edited June 17, 2018 by Patrick2562 Link to comment
WiBox Posted June 17, 2018 Author Share Posted June 17, 2018 Hide for everyone, that why I used getElementsByType("player") Link to comment
Moderators Patrick Posted June 17, 2018 Moderators Share Posted June 17, 2018 2 minutes ago, SSKE said: Hide for everyone, that why I used getElementsByType("player") And what is the dimension 336? Link to comment
WiBox Posted June 17, 2018 Author Share Posted June 17, 2018 I'm making it for events, the events dimension is 336, that why I want so the blips only disappear at the dimension 336 Link to comment
Moderators Patrick Posted June 17, 2018 Moderators Share Posted June 17, 2018 (edited) 3 minutes ago, SSKE said: I'm making it for events, the events dimension is 336, that why I want so the blips only disappear at the dimension 336 Ohh. I see. Do you use RADAR resource? Edited June 17, 2018 by Patrick2562 Link to comment
WiBox Posted June 17, 2018 Author Share Posted June 17, 2018 (edited) second https://imgur.com/a/asnP7tZ this radar, also from F11 ( full map ) Edited June 17, 2018 by SSKE Link to comment
Moderators Patrick Posted June 17, 2018 Moderators Share Posted June 17, 2018 I sent you a PM. Link to comment
WiBox Posted June 17, 2018 Author Share Posted June 17, 2018 Oh I found a idea, if I execute F11 command and I hide the radar It will work right?! 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