You definitely don't want to go for using OnPlayerUpdate for that...
If you want to make it as an command, here's a brief instruction how:
E.g. something like:
/hidetag playerid/playername 0/1
-> user for playerid
-> val for true (hide), false (show)
Код:
#define invisible 0xFFFFFF00 // on top of the script
Parts of your command code:
Код:
if(val){
switch(gTeam[user]){
case TEAM_NO1:{
for(new i;i<MAX_PLAYERS;i++)
SetPlayerMarkerForPlayer(i, user, COLOR_TEAM_1);
}
case TEAM_NO2:{
for(new i;i<MAX_PLAYERS;i++)
SetPlayerMarkerForPlayer(i, user, COLOR_TEAM_2);
}
}
} else {
for(new i;i<MAX_PLAYERS;i++)
SetPlayerMarkerForPlayer(i, user, COLOR_INV);
}
Adjust COLOR_TEAM_X and TEAM_NO1 as you please.