Quote:
Originally Posted by ATGOggy
Try this:
PHP Code:
if ((newkeys & KEY_CROUCH) && !(oldkeys & KEY_CROUCH))
{
if(GameStatus == 2 && IsReady[playerid] == true)
{
if(PlayerCurrentlyCrouched[playerid] == false) // Not currently crouching.
{
PlayerCurrentlyCrouched[playerid] = true;
for(new i=0; i < MAX_PLAYERS; i++)
{
ShowPlayerNameTagForPlayer(playerid, i, 0);
}
}
if(PlayerCurrentlyCrouched[playerid] == true) // If the player's crouching.
{
PlayerCurrentlyCrouched[playerid] = true;
for(new i=0; i < MAX_PLAYERS; i++)
{
ShowPlayerNameTagForPlayer(playerid, i, 1);
}
}
}
}
public OnPlayerStreamIn(playerid, forplayerid)
{
if(IsPlayerCurrentlyCrouched[playerid])
{
ShowNameTagFprPlayer(playerid, forplayerid, 0);
}
return 1;
}
|
Thank you. My friend and I tried testing it before onplayerstreamin, and it didn't work. We'll try testing it with it in about an hour or so.
Quote:
Originally Posted by Abagail
You also need to hide nametags for streaming in players if you aren't already as a side note. Otherwise, print debug statements to see if the code actually gets executed.
|
Will try. Thank you.