Hello back, this is my code and it do not change the invisibilty when I take knife out:
public Action:BuffCheckLoop(Handle:timer, any:target)
{
if (War3_GetRace(target)== raceID)
{
CreateTimer(1.0, BuffCheckLoop, GetClientUserId(target));
decl String:name[64];
new String:weapon[128];
GetClientWeapon(target, weapon, 128);
new skill_level = War3_GetSkillLevel(target, raceID, INVISIBILITY);
if(skill_level)
{
if (StrEqual(weapon,"weapon_knife"))
{
War3_SetBuff(target, fInvisibilitySkill, raceID, InvisibilityAlphaKnife[skill_level]);
}
else
{
War3_SetBuff(target, fInvisibilitySkill, raceID, InvisibilityAlpha[skill_level]);
}
}
}
}