[Ajuda] O que estб errado nesse cуdigo:
#3

Teste assim:

Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
{
    if(issuerid != INVALID_PLAYER_ID)
    {
		if(bodypart == 9 || bodypart == 4)
		{
			new infoString[128], weaponName[24], victimName[MAX_PLAYER_NAME], attackerName[MAX_PLAYER_NAME];
			GetPlayerName(playerid, victimName, sizeof (victimName));
			GetPlayerName(issuerid, attackerName, sizeof (attackerName));

			GetWeaponName(weaponid, weaponName, sizeof (weaponName));

			if(bodypart == 9) 
			{
				SetPlayerHealth(playerid, 0.0);
				format(infoString, sizeof(infoString), "%s Deu um tiro na cabeзa de %s, usando %s", attackerName, victimName, weaponName);
			}
			else 
			{
				new Float:Vida;
				GetPlayerHealth(playerid, Vida);
				SetPlayerHealth(playerid, Vida - 40.0);
				format(infoString, sizeof(infoString), "%s Deu um tiro nas partes baixas de %s, usando %s", attackerName, victimName, weaponName);
			}
			SendClientMessageToAll(AMARELO, infoString);
    }
	return 1;
}
Reply


Messages In This Thread
O que estб errado nesse cуdigo: - by Gabriel432135 - 14.02.2019, 00:27
Re: O que estб errado nesse cуdigo: - by Felipealves - 14.02.2019, 00:44
Re: O que estб errado nesse cуdigo: - by JeffSantos2 - 14.02.2019, 00:44
Re: O que estб errado nesse cуdigo: - by Gabriel432135 - 15.02.2019, 18:14

Forum Jump:


Users browsing this thread: 1 Guest(s)