elõször is:
[pawn]#define ARMOUR_INDEX 4 // this is the index of armour[/pawn]
utánna pedig:
[pawn]public OnPlayerUpdate(playerid)
{
new Float:armour[MAX_PLAYERS];
GetPlayerArmour(playerid, armour[playerid]);
if( armour[playerid] > 0.0 )
{
SetPlayerAttachedObject( playerid, ARMOUR_INDEX, 1242, 1, 0.019999, 0.039999, 0.000000, 2.459999, 89.699989, -3.100000, 1.710000, 2.119999, 1.719999);//áðîíÿ
}
else if( armour[playerid] == 0.0 && IsPlayerAttachedObjectSlotUsed(i, ARMOUR_INDEX))
{
RemovePlayerAttachedObject(playerid, ARMOUR_INDEX); // armour
}
return 1;
}[/pawn]
Amúgy ott volt alatta