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

Complete non-sense this is where you SHOULD use it because you need this feature to be responsive when done correctly it won't use much of anything in terms of resources simply a drop of water in the pond. Why is that? Let me show you. You could even run this in a timer but then you are going to lose some response time OPU won't be a problem at all this is very light.

Code:
static bool:PlayerCrouching[MAX_PLAYERS];

public OnPlayerUpdate(playerid)
{
	if(PlayerCrouching[playerid])
	{
		// Player stopped crouching
	    if(GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK))
	    {
	        PlayerCrouching[playerid] = false;
	        // Unhide player label
	    }
	}
	else
	{
	    if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_DUCK))
	    {
	        PlayerCrouching[playerid] = true;
	        // Hide player labels
	    }
	
	}
	return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)