18.05.2011, 20:10
pawn Код:
forward ChecarLife();
SetTimerEx("ChecarLife",1000,true);
public ChecarLife()
{
new Float:Armour[MAX_PLAYERS];
GetPlayerArmour(i,Armour[i]);
for(new i = 0; i < GetMaxPlayers(); i++)
{
if(Armour[i] > 0)
{
SetPlayerAttachedObject(i,5, 19142,1,0.100563, 0.056516, 0.003794, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 );
}
else
{
if(IsPlayerAttachedObjectSlotUsed(playerid,5)) RemovePlayerAttachedObject(playerid,5);
}
}
}