dead = {} local attack_delay = 250 function chopping_fools_init_name(e,name) dead[e] = 0 weapon_name[e] = "chopping zombie" end function chopping_fools_main(e) if GetPlayerDistance(e) > 100 then CharacterControlUnarmed(e) AIEntityGoToPosition(g_Entity[e]['obj'],g_PlayerPosX,g_PlayerPosZ) else AIEntityStop(g_Entity[e]['obj']) if GetTimer(e) > attack_delay then HurtPlayer(e,math.random(1,3)) attack_delay = GetTimer(e) + 250 end end RotateToPlayer(e) end --main function chopping_fools_exit(e) --for other weapons change or add the number here if g_PlayerGunID == 8 then dead[e] = 1 CollisionOff(e) Hide(e) Destroy(e) end end --exit