Player Markers
#1

Is there a way to show player markers without using ShowPlayerMarkers in different instances?

Generally, I don't want player markers enabled for everyone so I set it to 0 under OnGameModeInit(), now whenever I use SetPlayerMarkerForPlayer() for a command it doesn't show up.

Any suggestions? Thanks.
Reply
#2

I'am Not Sure but i think there is No Other Way But let's Wait for Others Reply
Reply
#3

hey..

I never Experienced this to .. try this

remove ShowPlayerMarkers in your gamemodeinit()

and add a loop like this
pawn Код:
for(new i=0;i<MAX_PAYERS;i++)
{
SetPlayerColor(i, 0xFFFFFF00);//this will alpha transperent color of player
}
and then use your SetPlayerMarkerForPlayer() .. well i think it will work fine and remember to use FF at last color code to see the marker
Reply
#4

Tried that too, didn't work.
Reply
#5

Show us your code.

Note that SetPlayerMarkerForPlayer has a 3rd parameter - color. Setting the alpha channel to 00 will effectively hide the marker. And most likely you'd need to use the function in a loop.
pawn Код:
// playerid - the player whose marker you want to hide from players in gTeam 2
for(new i = 0; i != MAX_PLAYERS; i++)
{
    if(!IsPlayerConnected(i) || gTeam[i] != 2) // Don't continue the loop for unconnected IDs or if the player is in any team other than 2.
        continue;

    SetPlayerMarkerForPlayer(i, playerid, 0xFFFFFF00);
}
Reply
#6

Like I said, I've tried that too and it didn't work. There's not much to show with regards to my code since it's similar with what you guys have posted. I didn't use ShowPlayerMarkers() and used a loop through all the players to show a transparent player marker. In the end, it still shows up player markers for everyone.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)