Players Colors
#7

Add them anywhere, but outside of any callback/custom function and under includes/defines.

For example:
pawn Код:
#include <a_samp>
// more #include ...

// #define ...

public OnPlayerConnect(playerid)
{
    // some code
    return 1;
}

// other callbacks

public OnPlayerStreamIn( playerid, forplayerid )
{
    if( gTeam[ playerid == gTeam[ forplayerid ] ) // CHANGE THEM TO YOURS
    {
        SetPlayerMarkerForPlayer( forplayerid, playerid, GetPlayerColor( playerid ) );
    }
}

public OnPlayerStreamOut( playerid, forplayerid )
{
    if( gTeam[ playerid == gTeam[ forplayerid ] ) // CHANGE THEM TO YOURS
    {
        SetPlayerMarkerForPlayer( forplayerid, playerid, GetPlayerColor( playerid ) );
    }
}
Make sure that you set the color before, when they choose their team. And change gTeam to the one you use for storing the player's team (unless it's same).
Reply


Messages In This Thread
Players Colors - by yancarlos4500 - 02.09.2013, 03:05
Re: Players Colors - by Skribblez - 02.09.2013, 03:27
Re: Players Colors - by yancarlos4500 - 02.09.2013, 19:15
Re: Players Colors - by Konstantinos - 02.09.2013, 19:33
Re: Players Colors - by yancarlos4500 - 02.09.2013, 20:14
Re: Players Colors - by yancarlos4500 - 03.09.2013, 00:12
Re: Players Colors - by Konstantinos - 03.09.2013, 10:35

Forum Jump:


Users browsing this thread: 1 Guest(s)