SetPlayerMarkerForPlayer
#1

pawn Код:
public ShowTeamMarkers(playerid)
{
    for(new i=0; i < MAX_PLAYERS; i++)
    {
        if (IsPlayerConnected(i))
        {
            if(gTeam[playerid] == gTeam[i])
            {
                SetPlayerMarkerForPlayer( playerid, i, GetPlayerColor(i) );
                SetPlayerMarkerForPlayer( i, playerid, GetPlayerColor(playerid) );
            }
            else
            {
                SetPlayerMarkerForPlayer( playerid, i, ( GetPlayerColor( i ) & 0xFFFFFF00 ) );
                SetPlayerMarkerForPlayer( i, playerid, ( GetPlayerColor( playerid ) & 0xFFFFFF00 ) );
            }
        }
    }
}
This was suposed to make a team members see only the same team markers and make the other team markers invisible.
It doesnt work though.
Reply
#2

BUMP!

Ok. So i want the marker to be invisible for the other team.
If a player spawns in team blue ,let's say,he cannot see markers of team red.

Taught that some ppl didnt understand.
Reply
#3

pawn Код:
public ShowTeamMarkers1(playerid)
{
    for(new i=0; i < MAX_PLAYERS; i++)
    {
        if (IsPlayerConnected(i))
        {
            if(gTeam[playerid] == gTeam[i])
            {
                SetPlayerMarkerForPlayer(playerid, i, 0xFF0000FF );

            }
        }
    }
}

public ShowTeamMarkers2(playerid)
{
    for(new i=0; i < MAX_PLAYERS; i++)
    {
        if (IsPlayerConnected(i))
        {
            if (gTeam[playerid] != gTeam[i])
            {
            SetPlayerMarkerForPlayer( playerid, i, ( GetPlayerColor( i ) & 0xFFFFFF00 ) );
            }
        }
    }
}
i made 2 callback functions 1 will set every player set on the same in the same color on the map and the other will set every other player to have no marker but color will appear in the chat


PS. I understood in the first time just the first time im looking at the thread
Reply
#4

No that wont work. It will set the same color for all teams.
Reply
#5

the code sets the player colour to show only for those on the team

the second code will make make players not on the same team invisible
Reply
#6

When i get close to the other player the Marker is visible...and sometimes when i die he can see me but i cant see his
Reply
#7

did u try that code i did? ofc u see the player color above there head then u need to use this

https://sampwiki.blast.hk/wiki/ShowPlayerNameTagForPlayer
Reply
#8

It doesnt work at all,your code,as i was saying. I can see other people on map,from the other team.
Reply
#9

https://sampwiki.blast.hk/wiki/SetPlayerMarkerForPlayer

My code ihu read that again u need it
Reply
#10

I just need someone to point the mistake in my Code. Cuz i cant really find it :S
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)