Lisandu Posted December 28, 2021 Share Posted December 28, 2021 (edited) Do anyone know how to hide player blip in Radar only For an Admins For command like t/hideblip . Help me and thanks.... im new to sripting Edited December 28, 2021 by Lisandu Link to comment
Shady1 Posted December 28, 2021 Share Posted December 28, 2021 hello lisandu, i don't understand what you mean exactly because you can't talk about code and mod, so i can give you three or five ideas,If you explain a little more in detail and share the code of the system you want to build, people might be able to help you,Please open a more descriptive topic. now there are 2 methods for this, the first method is to delete and recreate, so you can give the effect of disappearing and visible, this is used if the blip with 0 id is not used, technically, if the blip with 0 id is setBlipColor, it can be, and getAttachedElements you can pull attached elements with this Link to comment
Hydra Posted December 28, 2021 Share Posted December 28, 2021 (edited) Just an example: local blips = {} function onJoin() if not blips[source] then blips[source] = createBlipAttachedTo(etc...) end end addEventHandler("onPlayerJoin", root, onJoin) function onQuit() if blips[source] then blips[source] = nil destroyElement(blips[source]) end end addEventHandler("onPlayerQuit", root, onQuit) function hideBlip(thePlayer, command) if blips[thePlayer] then setBlipColor(blips[thePlayer], r, g, b, 0) end end addCommandHandler("hideblip", hideBlip) you can use https://wiki.multitheftauto.com/wiki/IsObjectInACLGroup or https://wiki.multitheftauto.com/wiki/IsPlayerInACL(the same thing but the 2nd is shorter) to check if the player is an admin. Edited December 28, 2021 by Hydra 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