Jump to content

[HELP] Admin Blip hide


Lisandu

Recommended Posts

Posted (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 :D

Edited by Lisandu

Lisandu

Posted

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

Posted (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 by Hydra

Social Media:

 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...