[Pedido] Como Criar Um Pickup de dano mostra qnd perdeu o colete ou a vida :D (TEM PRINT)
#3

no topo

Код:
new Float:pHealth[MAX_PLAYERS];
new Float:pArmour[MAX_PLAYERS];
coloca no onplayerupdate

Код:
	static Float:health, Float:armour;
	GetPlayerHealth(playerid, health);
	GetPlayerArmour(playerid, armour);
	if(pArmour[playerid] > armour)
	{
		new obj = CreateObject(1242, 0, 0, 0, 0, 0, 0);
		AttachObjectToPlayer(obj, playerid, 0, 0, 1.5, 0, 0 , 0);
		SetTimerEx("DestroyObjectEx", 200, false, "i", obj);
		PlayerPlaySound(playerid, 17805, 0, 0, 0);

	}
	if(pHealth[playerid] > health)
	{
		
		new obj = CreateObject(1240, 0, 0, 0, 0, 0, 0);
		AttachObjectToPlayer(obj, playerid, 0, 0, 1.5, 0, 0 , 0);
		SetTimerEx("DestroyObjectEx", 200, false, "i", obj);
		PlayerPlaySound(playerid, 17805, 0, 0, 0);
	}
	pHealth[playerid] = health;
	pArmour[playerid] = armour;
nгo sei se funciona, nгo to com tempo pra testar :*
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)