Hi guys,
It's my first time using weaploss and I'm unsure of why it's not working as seen in the code below:
I'm putting this on a didhit script for the player.
Any help is much appreciated.
Thanks
It's my first time using weaploss and I'm unsure of why it's not working as seen in the code below:
I'm putting this on a didhit script for the player.
Code:
void main()
{
SuperArmorOnAnim (openborconstant("ANI_FOLLOW81"), openborconstant("ANI_FREESPECIAL35"));
}
void SuperArmorOnAnim (int PAnim1, int PAnim2){
void ent = getlocalvar("self");
int animation = getentityproperty(ent, "animationid");
if(animation == PAnim1 || animation == PAnim2){
changeentityproperty(ent, "nopain", 1);
changeentityproperty(ent, "nodrop", 1);
changeentityproperty(ent, "weaploss", 3);
} else {
changeentityproperty(ent, "nopain", 0);
changeentityproperty(ent, "nodrop", 0);
changeentityproperty(ent, "weaploss", 0);
}
}
Any help is much appreciated.
Thanks