Modafinil Posted April 23, 2023 Share Posted April 23, 2023 I'm trying to change the visibility of a blip, trying to make it visible to everyone except the player pd_blip[player] = createBlipAttachedTo(player, 0, 3, 255, 0, 0, 255, 32767) setElementVisibleTo(pd_blip[player], player, false) the blip remains visible to the player and setElementVisibleTo returns false. Did i do something wrong? Link to comment
FLUSHBICEPS Posted April 23, 2023 Share Posted April 23, 2023 u need to loop through all players and set the visibility for each player individually pd_blip[player] = createBlipAttachedTo(player, 0, 3, 255, 0, 0, 255, 32767) -- invisible to the player setElementVisibleTo(pd_blip[player], player, false) -- loop and make the blip visible to everyone except the playet for _, otherPlayer in ipairs(getElementsByType("player")) do if otherPlayer ~= player then setElementVisibleTo(pd_blip[player], otherPlayer, true) end end 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