itsMatheus Posted December 28, 2017 Share Posted December 28, 2017 (edited) Hey guys. I'm new to scripting, only learning from the wiki, but I couldn't figure out how to create a blip that only appears for a certain team. local playersinteam = getPlayersInTeam(getTeamFromName("EMS")) createBlipAttachedTo(source, 0, 5, 255, 255, 0, 255, 0, 65535, playersinteam) This is the part of my script that i'm having troubles with. If anyone could help me out I would very much appreciate it. Edited December 28, 2017 by aionsrlindo Link to comment
Melbourne Posted December 28, 2017 Share Posted December 28, 2017 getPlayersInTeam returns a table of all the players in the team, so that only the team sees the blip you have to do this: addCommandHandler("showblip", function ( ... ) -- > this is the correct way local playersinteam = getPlayersInTeam(getTeamFromName("EMS")) for i, players in ipairs( playersinteam ) do createBlipAttachedTo( players, 0, 5, 255, 255, 0, 255, 0, 65535, players ) end -- > this is not the correct way --local playersinteam = getPlayersInTeam(getTeamFromName("EMS")) --createBlipAttachedTo( players, 0, 5, 255, 255, 0, 255, 0, 65535, players ) end) -- type /showblip to show the blip I'm sorry if you do not understand me, I'm using Google translator. 1 Link to comment
itsMatheus Posted December 29, 2017 Author Share Posted December 29, 2017 @Melbourne Thank you so very much! And I could understand you just fine You don't know for how long I've been searching for this, haha. Link to comment
Storm-Hanma Posted December 29, 2017 Share Posted December 29, 2017 20 hours ago, Melbourne said: getPlayersInTeam returns a table of all the players in the team, so that only the team sees the blip you have to do this: addCommandHandler("showblip", function ( ... ) -- > this is the correct way local playersinteam = getPlayersInTeam(getTeamFromName("EMS")) for i, players in ipairs( playersinteam ) do createBlipAttachedTo( players, 0, 5, 255, 255, 0, 255, 0, 65535, players ) end -- > this is not the correct way --local playersinteam = getPlayersInTeam(getTeamFromName("EMS")) --createBlipAttachedTo( players, 0, 5, 255, 255, 0, 255, 0, 65535, players ) end) -- type /showblip to show the blip I'm sorry if you do not understand me, I'm using Google translator. How to destroy blip or hide blip for player like admin?let me know I was waiting for this too 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