28.08.2009, 08:56
Untested, but it should work
pawn Code:
public OnPlayerCommadText(playerid, cmdtext[])
{
if(!strcmp("/makemeinvisible", cmdtext))
{
new a = GetMaxPlayers();
for(new id = 0; id > a; id++)
{
if(!IsPlayerConnected) continue;
ShowPlayerNameTagForPlayer( id, playerid, false );
SetPlayerMarkerForPlayer( id, playerid, 0xFFFFFF00 );
}
SendClientMessage(playerid, color, "You are invisible to other players");
return 1;
}
if(!strcmp("/makemevisible", cmdtext))
{
new a = GetMaxPlayers();
for(new id = 0; id > a; id++)
{
if(!IsPlayerConnected) continue;
ShowPlayerNameTagForPlayer( id, playerid, true );
SetPlayerMarkerForPlayer( id, playerid, COLOR );
}
SendClientMessage(playerid, color, "You are visible to other players");
return 1;
}
return 0;
}