03.09.2013, 10:35
Add them anywhere, but outside of any callback/custom function and under includes/defines.
For example:
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).
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 ) );
}
}