[FilterScript] Armour Update
#4

well here is the fix code


pawn Код:
public ArmourUpdate()
{
    new Float:armour;//this is our armour value
    for(new i=0; i<=GetMaxPlayers(); i++)//i'm put this code, cause i had bug before, when armour can have only player with id 0!
    {
        GetPlayerArmour(i, armour);//checking hommuch armour player has...
        if( armour > 0.0 )//...if player has more then 0.0 of armour...
        {
            SetPlayerAttachedObject( i, ARMOUR_INDEX, 373, 1, 0.286006, -0.038657, -0.158132, 67.128456, 21.916156, 33.972290, 1.000000, 1.000000, 1.000000 ); // ...armour getting on the players body...
        }
        else if( armour == 0.0 )//...if player do not have armour...
        {
            RemovePlayerAttachedObject(i, ARMOUR_INDEX); // ...armour getting off the players body...
        }
        return 1;//the value what function returning
    }
    return 0;
}
Reply


Messages In This Thread
Armour Update - by Nexotronix - 10.01.2011, 11:21
Re: Armour Update - by Mr.Stranger - 10.01.2011, 11:26
Re: Armour Update - by Biesmen - 10.01.2011, 11:36
Re: Armour Update - by Mr.Stranger - 10.01.2011, 11:45
Re: Armour Update - by Red_Devils - 10.01.2011, 12:00
Re: Armour Update - by Nexotronix - 10.01.2011, 12:21
Re: Armour Update - by schillow - 10.01.2011, 12:39
Re: Armour Update - by Hash [NL-RP] - 10.01.2011, 15:16
Re: Armour Update - by Kwarde - 10.01.2011, 15:35
Re: Armour Update - by Hash [NL-RP] - 10.01.2011, 15:40

Forum Jump:


Users browsing this thread: 1 Guest(s)