Trying to make player nametags hide when they're crouched.
#1

However, it doesn't work. At all. Can anyone spot an issue? I've tried multiple methods.

pawn 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(i, playerid, 0);
                }
            }
            if(PlayerCurrentlyCrouched[playerid] == true) // If the player's crouching.
            {
                PlayerCurrentlyCrouched[playerid] = true;
                for(new i=0; i < MAX_PLAYERS; i++)
                {
                    ShowPlayerNameTagForPlayer(i, playerid, 1);
                }
            }
           
        }
    }
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)