Michcio Posted January 10, 2013 Share Posted January 10, 2013 I write some code and it works but not in 100%. I have problem with v. My blip is not visible for all players in that team. function onPlayerSpawn ( spawnpoint ) local r,g,b = getTeamColor(getPlayerTeam(source)) if getPlayerTeam(source) ~= getTeamFromName("Policja") then if ( players[source] ) then createBlipAttachedTo ( source, 0, 2, r, g, b ) else createBlipAttachedTo ( source, 0, 2, r, g, b ) end else for k,v in ipairs(getPlayersInTeam(getTeamFromName("Policja"))) do destroyBlipsAttachedTo ( v ) blip = createBlipAttachedTo(v, 0, 2, r, g, b, 255, 0, 9999.0, v ) setElementVisibleTo(blip,v,true) setElementVisibleTo(blip,getRootElement(),false) setElementVisibleTo(blip,source,true) setTimer(createBlipAttachedTo, 500, 1, source, 0, 2, r, g, b, 255, 0, 9999.0, v ) end end end Link to comment
manve1 Posted January 10, 2013 Share Posted January 10, 2013 try without these lines: setElementVisibleTo(blip,getRootElement(),false) setElementVisibleTo(blip,source,true) Link to comment
Michcio Posted January 10, 2013 Author Share Posted January 10, 2013 Now players in team see only player who spawn (source). Link to comment
Michcio Posted January 10, 2013 Author Share Posted January 10, 2013 Oh i've done it. Thanks for help. 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