Jump to content

'visibleto' problem


Tete omar

Recommended Posts

Hi , i've tried to make a blip visible to some team , and it's not working , here's the code

local playersInTeam=getPlayersInTeam(team) 
for i,v in ipairs(playersInTeam) do 
    blips[player]=createBlipAttachedTo(player,19,2,255,0,0,0,99999.0,v) 
end 

blips is a table and player is the (hitElement) of a timer in 'onColShapeHit' , i passed 'hitElement' to the timer, and team is defined as a team , but my problem is , when that blip is being to appear , it appears to all players , not just the players whose is into the 'team' , and if no player is in 'team' then the blip won't appears , any idea how to make that blip appears to the players whose is into the 'specific' team ?

Link to comment
local playersInTeam = getPlayersInTeam ( team ) 
blips [ player ] = createBlipAttachedTo ( player, 19, 2, 255, 0, 0, 0, 99999.0 ) 
setElementVisibleTo ( blips [ player ], root, false ) 
for _, player_ in ipairs ( playersInTeam ) do 
   setElementVisibleTo ( blips [ player ], player_, true ) 
end 

Try it.

Link to comment

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...