Jump to content

Need help with playerblips


Michcio

Recommended Posts

Posted
local theTeam = "The team name"; 
  
for i,v in ipairs( getElementsByType( 'player' ) ) do 
    if ( ( getTeamName( getPlayerTeam( v ) ) == theTeam ) and ( v == localPlayer ) ) then 
        --draw map name 
    end 
end 

"[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007

Posted

There is a "visible to" parameter in createBlip.

"[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007

Posted

Show the code you tried.

"[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007

Posted
function onPlayerSpawn1 ( spawnpoint ) 
    for id, player in ipairs( getElementsByType ( "player" ) ) do 
    if getPlayerTeam(player) == getTeamFromName("Policja") then 
            createBlipAttachedTo ( source, 0, 2, 0, 0, 255, 255, 0, 300, player ) 
    end 
    end 
end 

Posted

Where is "source" defined?

"[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007

Posted (edited)

Is that code server-side in meta.xml? Show meta.xml.

Check for errors in debug also, I can't seem to find any. Maybe it's me, I'm fucked up today.

Edited by Guest

"[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007

Posted
function onPlayerSpawn1 ( spawnpoint ) 
    local blip = createBlipAttachedTo ( source, 0, 2, 0, 0, 255, 255, 0, 300 ) 
    setElementVisibleTo ( blip, root, false ) 
    for _, player in ipairs ( getPlayersInTeam ( getTeamFromName ( "Policja" ) ) ) do 
        setElementVisibleTo ( blip, player, true ) 
    end 
end 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

My script should hide it for everyone, then show it to the players inside the team.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

I know it but it shows it to players who is in team at the moment. I need to do that it is visible to players who is in this team all the time.

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