16.01.2013, 00:15
no topo
coloca no onplayerupdate
nгo sei se funciona, nгo to com tempo pra testar :*
Код:
new Float:pHealth[MAX_PLAYERS]; new Float:pArmour[MAX_PLAYERS];
Код:
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;

