[Ajuda] Booleana
#7

Quote:
Originally Posted by Whoo
Посмотреть сообщение
fabio o que seria esse ID ai ? ele tem o valor de 0 entгo o loop nгo iria funcionar.. pois a variavel ja ganha o valor 0 quando й criada.
Код:
public OnFilterScriptInit()
{
	print("FS");
	return 1;
}

public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid)
{
	for(new i; i < GetPlayerPoolSize() + 1; i++)
	{

		if(IsPlayerConnected(i))
		{

			if(uhul[i]) // se for verdadeiro
			{

				static Float:vida;
				GetPlayerHealth(damagedid, vida);
				SetPlayerArmour(damagedid, (vida-amount));
				SetPlayerHealth(damagedid, (vida-amount));
			}
		}
	}
	return 1;
}

CMD:bora(playerid)
{
	for(new i; i < GetPlayerPoolSize() + 1; i++)
	{

		format(string, sizeof(string), "O %s Vamo em boraaa", nome(playerid));
		SendClientMessageToAll(-1, string);
		SetPlayerHealth(i, 100);
		SetPlayerArmour(i, 100);
		uhul[i] = true;
	}
	return 1;
}

CMD:saircf(playerid)
{
	for(new i; i < GetPlayerPoolSize() + 1; i++)
	{

		format(string, sizeof(string), "O %s mandou geral voltar", nome(playerid));
		SendClientMessageToAll(-1, string);
		uhul[i] = false;
		SpawnPlayer(i);
		SetPlayerArmour(i, 0);
	}
	return 1;
}

nome(playerid)
{
	new nomee[MAX_PLAYER_NAME];
	GetPlayerName(playerid, nomee, sizeof(nomee));
	return nomee;
}
Entendi obrigado, mais poderia explicar essa funзгo GetPlayerPoolSize ?
Reply


Messages In This Thread
Booleana - by FabioGTP - 25.09.2016, 20:14
Re: Booleana - by JPedro - 25.09.2016, 20:21
Re: Booleana - by FabioGTP - 25.09.2016, 20:23
Re: Booleana - by JPedro - 25.09.2016, 20:28
Re: Booleana - by FabioGTP - 25.09.2016, 20:44
Re: Booleana - by Whoo - 25.09.2016, 20:58
Re: Booleana - by FabioGTP - 25.09.2016, 21:04
Re: Booleana - by JPedro - 25.09.2016, 21:04
Re: Booleana - by FabioGTP - 25.09.2016, 21:11
Respuesta: Booleana - by SammyJ - 25.09.2016, 21:14

Forum Jump:


Users browsing this thread: 2 Guest(s)