Small issue with playerstate
#1

Hey there.
I was wondering if you guys could help me with getting 2 playerstates work simultaneously but not having both mandatory at the same time. Having something like X or Y instead of X and Y

Код:
stock GetPlayersOnBlueTeam()
{
	new BlueTeam=0;
	for (new i=0;i<MAX_PLAYERS;i++)
	{
		if(GetPlayerState(i) == PLAYER_STATE_ONFOOT && GetPlayerState(i) == PLAYER_STATE_DRIVER && GetPVarInt(i, "team") == 1 && GetPVarInt(i, "spectating") == 0 )
		{
  			BlueTeam++;
		}
	}
	return BlueTeam;
}
With this, the player has to be both on foot and driving in order to be added to the counter, and I want to have it like "if the player is either on foot or driving, add him to the counter"

Thank you
Reply


Messages In This Thread
Small issue with playerstate - by notaromanian - 20.02.2016, 13:03
Re: Small issue with playerstate - by Chump - 20.02.2016, 18:51
Re: Small issue with playerstate - by notaromanian - 21.02.2016, 13:50

Forum Jump:


Users browsing this thread: