SetPlayerMarkerForPlayer -
[rG]Cold - 13.11.2012
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.
Re: SetPlayerMarkerForPlayer -
[rG]Cold - 14.11.2012
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.
Re: SetPlayerMarkerForPlayer -
Glad2BeHere - 14.11.2012
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
Re: SetPlayerMarkerForPlayer -
[rG]Cold - 14.11.2012
No that wont work. It will set the same color for all teams.
Re: SetPlayerMarkerForPlayer -
Glad2BeHere - 14.11.2012
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
Re: SetPlayerMarkerForPlayer -
[rG]Cold - 14.11.2012
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
Re: SetPlayerMarkerForPlayer -
Glad2BeHere - 14.11.2012
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
Re: SetPlayerMarkerForPlayer -
[rG]Cold - 14.11.2012
It doesnt work at all,your code,as i was saying. I can see other people on map,from the other team.
Re: SetPlayerMarkerForPlayer -
Glad2BeHere - 14.11.2012
https://sampwiki.blast.hk/wiki/SetPlayerMarkerForPlayer
My code ihu read that again u need it
Re: SetPlayerMarkerForPlayer -
[rG]Cold - 14.11.2012
I just need someone to point the mistake in my Code. Cuz i cant really find it :S